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

Diff for /src/usr.bin/top/commands.c between version 1.30 and 1.31

version 1.30, 2010/04/01 05:05:19 version 1.31, 2013/11/28 18:24:55
Line 100 
Line 100 
                 return (-1);                  return (-1);
   
         while ((ch = *str++) != '\0') {          while ((ch = *str++) != '\0') {
                 if (isspace(ch))                  if (isspace((unsigned char)ch))
                         break;                          break;
                 else if (!isdigit(ch))                  else if (!isdigit((unsigned char)ch))
                         bad_flag = 1;                          bad_flag = 1;
                 else                  else
                         val = val * 10 + (ch - '0');                          val = val * 10 + (ch - '0');
Line 284 
Line 284 
         uid = getuid();          uid = getuid();
   
         /* skip over leading white space */          /* skip over leading white space */
         while (isspace(*str))          while (isspace((unsigned char)*str))
                 str++;                  str++;
   
         if (*str == '-') {          if (*str == '-') {
Line 294 
Line 294 
                 if ((nptr = next_field(str)) == NULL)                  if ((nptr = next_field(str)) == NULL)
                         return (" kill: no processes specified");                          return (" kill: no processes specified");
   
                 if (isdigit(*str)) {                  if (isdigit((unsigned char)*str)) {
                         (void) scan_arg(str, &signum, tmp);                          (void) scan_arg(str, &signum, tmp);
                         if (signum <= 0 || signum >= NSIG)                          if (signum <= 0 || signum >= NSIG)
                                 return (" invalid signal number");                                  return (" invalid signal number");
Line 352 
Line 352 
         uid = getuid();          uid = getuid();
   
         /* skip over leading white space */          /* skip over leading white space */
         while (isspace(*str))          while (isspace((unsigned char)*str))
                 str++;                  str++;
   
         /* allow for negative priority values */          /* allow for negative priority values */

Legend:
Removed from v.1.30  
changed lines
  Added in v.1.31