Print this page
10333 cw: error: comparison between pointer and zero character constant

Split Close
Expand all
Collapse all
          --- old/usr/src/tools/cw/cw.c
          +++ new/usr/src/tools/cw/cw.c
↓ open down ↓ 590 lines elided ↑ open up ↑
 591  591                  nomem();
 592  592  
 593  593          return (ret);
 594  594  }
 595  595  
 596  596  static boolean_t
 597  597  is_source_file(const char *path)
 598  598  {
 599  599          char *ext = strrchr(path, '.');
 600  600  
 601      -        if ((ext == NULL) || ((ext + 1) == '\0'))
      601 +        if ((ext == NULL) || (*(ext + 1) == '\0'))
 602  602                  return (B_FALSE);
 603  603  
 604  604          ext += 1;
 605  605  
 606  606          if ((strcasecmp(ext, "c") == 0) ||
 607  607              (strcmp(ext, "cc") == 0) ||
 608  608              (strcmp(ext, "i") == 0) ||
 609  609              (strcasecmp(ext, "s") == 0) ||
 610  610              (strcmp(ext, "cpp") == 0)) {
 611  611                  return (B_TRUE);
↓ open down ↓ 1244 lines elided ↑ open up ↑
XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX