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

Diff for /src/usr.bin/ipcrm/ipcrm.c between version 1.10 and 1.11

version 1.10, 2005/12/19 19:13:50 version 1.11, 2015/04/18 18:28:37
Line 39 
Line 39 
 #include <sys/shm.h>  #include <sys/shm.h>
 #include <stdio.h>  #include <stdio.h>
 #include <unistd.h>  #include <unistd.h>
   #include <limits.h>
 #include <stdlib.h>  #include <stdlib.h>
 #include <ctype.h>  #include <ctype.h>
 #include <err.h>  #include <err.h>
Line 112 
Line 113 
 main(int argc, char *argv[])  main(int argc, char *argv[])
 {  {
         int c, result, errflg, target_id;          int c, result, errflg, target_id;
           const char *errstr;
         key_t target_key;          key_t target_key;
   
         errflg = 0;          errflg = 0;
Line 122 
Line 124 
                 case 'q':                  case 'q':
                 case 'm':                  case 'm':
                 case 's':                  case 's':
                         target_id = atoi(optarg);                          target_id = strtonum(optarg, 0, INT_MAX, &errstr);
                           if (errstr)
                                   errx(1, "-%c %s: %s\n", c, optarg, &errstr);
                         if (c == 'q')                          if (c == 'q')
                                 result = msgrm(0, target_id);                                  result = msgrm(0, target_id);
                         else if (c == 'm')                          else if (c == 'm')

Legend:
Removed from v.1.10  
changed lines
  Added in v.1.11