[BACK]Return to misc.c CVS log [TXT][DIR] Up to [local] / src / usr.bin / ssh

Diff for /src/usr.bin/ssh/misc.c between version 1.128 and 1.129

version 1.128, 2018/06/06 18:29:18 version 1.129, 2018/06/09 03:01:12
Line 214 
Line 214 
 #define QUOTE   "\""  #define QUOTE   "\""
   
 /* return next token in configuration line */  /* return next token in configuration line */
 char *  static char *
 strdelim(char **s)  strdelim_internal(char **s, int split_equals)
 {  {
         char *old;          char *old;
         int wspace = 0;          int wspace = 0;
Line 225 
Line 225 
   
         old = *s;          old = *s;
   
         *s = strpbrk(*s, WHITESPACE QUOTE "=");          *s = strpbrk(*s,
               split_equals ? WHITESPACE QUOTE "=" : WHITESPACE QUOTE);
         if (*s == NULL)          if (*s == NULL)
                 return (old);                  return (old);
   
Line 242 
Line 243 
         }          }
   
         /* Allow only one '=' to be skipped */          /* Allow only one '=' to be skipped */
         if (*s[0] == '=')          if (split_equals && *s[0] == '=')
                 wspace = 1;                  wspace = 1;
         *s[0] = '\0';          *s[0] = '\0';
   
         /* Skip any extra whitespace after first token */          /* Skip any extra whitespace after first token */
         *s += strspn(*s + 1, WHITESPACE) + 1;          *s += strspn(*s + 1, WHITESPACE) + 1;
         if (*s[0] == '=' && !wspace)          if (split_equals && *s[0] == '=' && !wspace)
                 *s += strspn(*s + 1, WHITESPACE) + 1;                  *s += strspn(*s + 1, WHITESPACE) + 1;
   
         return (old);          return (old);
   }
   
   /*
    * Return next token in configuration line; splts on whitespace or a
    * single '=' character.
    */
   char *
   strdelim(char **s)
   {
           return strdelim_internal(s, 1);
   }
   
   /*
    * Return next token in configuration line; splts on whitespace only.
    */
   char *
   strdelimw(char **s)
   {
           return strdelim_internal(s, 0);
 }  }
   
 struct passwd *  struct passwd *

Legend:
Removed from v.1.128  
changed lines
  Added in v.1.129