Print this page
5218 posix definition of NULL
correct unistd.h and iso/stddef_iso.h
update gate source affected

Split Close
Expand all
Collapse all
          --- old/usr/src/cmd/chmod/chmod.c
          +++ new/usr/src/cmd/chmod/chmod.c
↓ open down ↓ 545 lines elided ↑ open up ↑
 546  546          /* scan for the use of "--" in the argument list */
 547  547  
 548  548          for (fflag = i = 0; i < ac; i ++) {
 549  549                  if (strcmp(av[i], "--") == 0)
 550  550                          fflag = 1;
 551  551          }
 552  552  
 553  553          /* process the arguments */
 554  554  
 555  555          for (i = mac = 0;
 556      -            (av[i] != (char *)NULL) && (av[i][0] != (char)NULL);
      556 +            (av[i] != NULL) && (av[i][0] != '\0');
 557  557              i++) {
 558  558                  if (!fflag && av[i][0] == '-') {
 559  559                          /*
 560  560                           *  If there is not already a "--" argument specified,
 561  561                           *  and the argument starts with '-' but does not
 562  562                           *  contain any of the official option letters, then it
 563  563                           *  is probably a mode argument beginning with '-'.
 564  564                           *  Force a "--" into the argument stream in front of
 565  565                           *  it.
 566  566                           */
↓ open down ↓ 904 lines elided ↑ open up ↑
XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX