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

Diff for /src/usr.bin/newsyslog/newsyslog.c between version 1.91 and 1.92

version 1.91, 2013/04/05 01:29:07 version 1.92, 2013/11/26 13:19:07
Line 569 
Line 569 
   
                 q = parse = missing_field(sob(++parse), errline, lineno);                  q = parse = missing_field(sob(++parse), errline, lineno);
                 *(parse = son(parse)) = '\0';                  *(parse = son(parse)) = '\0';
                 if (isdigit(*q))                  if (isdigit((unsigned char)*q))
                         working->size = atoi(q) * 1024;                          working->size = atoi(q) * 1024;
                 else                  else
                         working->size = -1;                          working->size = -1;
Line 939 
Line 939 
 {  {
         if (p == NULL)          if (p == NULL)
                 return(p);                  return(p);
         while (isspace(*p))          while (isspace((unsigned char)*p))
                 p++;                  p++;
         return (p);          return (p);
 }  }
Line 948 
Line 948 
 char *  char *
 son(char *p)  son(char *p)
 {  {
         while (p && *p && !isspace(*p))          while (p && *p && !isspace((unsigned char)*p))
                 p++;                  p++;
         return (p);          return (p);
 }  }
Line 958 
Line 958 
 isnumberstr(char *string)  isnumberstr(char *string)
 {  {
         while (*string) {          while (*string) {
                 if (!isdigit(*string++))                  if (!isdigit((unsigned char)*string++))
                         return (0);                          return (0);
         }          }
         return (1);          return (1);
Line 1193 
Line 1193 
         if (*t != '\0') {          if (*t != '\0') {
                 s = ++t;                  s = ++t;
                 l = strtol(s, &t, 10);                  l = strtol(s, &t, 10);
                 if (l < 0 || l >= INT_MAX || (*t != '\0' && !isspace(*t)))                  if (l < 0 || l >= INT_MAX ||
                       (*t != '\0' && !isspace((unsigned char)*t)))
                         return (-1);                          return (-1);
   
                 switch (t - s) {                  switch (t - s) {
Line 1303 
Line 1304 
                                 return (-1);                                  return (-1);
                         WMseen++;                          WMseen++;
                         s++;                          s++;
                         if (tolower(*s) == 'l') {                          if (tolower((unsigned char)*s) == 'l') {
                                 tm.tm_mday = nd;                                  tm.tm_mday = nd;
                                 s++;                                  s++;
                                 t = s;                                  t = s;
Line 1325 
Line 1326 
                         break;                          break;
                 }                  }
   
                 if (*t == '\0' || isspace(*t))                  if (*t == '\0' || isspace((unsigned char)*t))
                         break;                          break;
                 else                  else
                         s = t;                          s = t;

Legend:
Removed from v.1.91  
changed lines
  Added in v.1.92