[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.187 and 1.188

version 1.187, 2023/08/28 03:31:16 version 1.188, 2023/10/11 22:42:26
Line 2386 
Line 2386 
         strftime(buf, len, "%Y-%m-%dT%H:%M:%S", &tm);          strftime(buf, len, "%Y-%m-%dT%H:%M:%S", &tm);
 }  }
   
   /*
    * Parse a "pattern=interval" clause (e.g. a ChannelTimeout).
    * Returns 0 on success or non-zero on failure.
    * Caller must free *typep.
    */
   int
   parse_pattern_interval(const char *s, char **typep, int *secsp)
   {
           char *cp, *sdup;
           int secs;
   
           if (typep != NULL)
                   *typep = NULL;
           if (secsp != NULL)
                   *secsp = 0;
           if (s == NULL)
                   return -1;
           sdup = xstrdup(s);
   
           if ((cp = strchr(sdup, '=')) == NULL || cp == sdup) {
                   free(sdup);
                   return -1;
           }
           *cp++ = '\0';
           if ((secs = convtime(cp)) < 0) {
                   free(sdup);
                   return -1;
           }
           /* success */
           if (typep != NULL)
                   *typep = xstrdup(sdup);
           if (secsp != NULL)
                   *secsp = secs;
           free(sdup);
           return 0;
   }
   
 /* check if path is absolute */  /* check if path is absolute */
 int  int
 path_absolute(const char *path)  path_absolute(const char *path)

Legend:
Removed from v.1.187  
changed lines
  Added in v.1.188