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

Diff for /src/usr.bin/ktrace/ktrace.c between version 1.31 and 1.32

version 1.31, 2015/01/16 06:40:09 version 1.32, 2015/04/18 18:28:37
Line 211 
Line 211 
 static int  static int
 rpid(const char *p)  rpid(const char *p)
 {  {
           const char *errstr;
         static int first;          static int first;
           pid_t pid;
   
         if (first++) {          if (first++) {
                 warnx("only one -g or -p flag is permitted.");                  warnx("only one -g or -p flag is permitted.");
Line 221 
Line 223 
                 warnx("illegal process id.");                  warnx("illegal process id.");
                 usage();                  usage();
         }          }
         return(atoi(p));          pid = strtonum(p, 1, INT_MAX, &errstr);
           if (errstr) {
                   warnx("illegal process id: %s", errstr);
                   usage();
           }
           return pid;
 }  }
   
 static void  static void

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