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/powertop/common/powertop.c
          +++ new/usr/src/cmd/powertop/common/powertop.c
↓ open down ↓ 141 lines elided ↑ open up ↑
 142  142                  case 'd':
 143  143                          if (PT_ON_DUMP) {
 144  144                                  pt_usage();
 145  145                                  exit(EXIT_USAGE);
 146  146                          }
 147  147  
 148  148                          g_op_mode |= PT_MODE_DUMP;
 149  149                          g_gui = B_FALSE;
 150  150                          dump_count = (int)strtod(optarg, &endptr);
 151  151  
 152      -                        if (dump_count <= 0 || *endptr != NULL) {
      152 +                        if (dump_count <= 0 || *endptr != '\0') {
 153  153                                  pt_usage();
 154  154                                  exit(EXIT_USAGE);
 155  155                          }
 156  156  
 157  157                          break;
 158  158                  case 't':
 159  159                          if (PT_ON_TIME) {
 160  160                                  pt_usage();
 161  161                                  exit(EXIT_USAGE);
 162  162                          }
 163  163  
 164  164                          g_op_mode |= PT_MODE_TIME;
 165  165                          interval = interval_usr = (double)strtod(optarg,
 166  166                              &endptr);
 167  167  
 168      -                        if (*endptr != NULL || interval < 1 ||
      168 +                        if (*endptr != '\0' || interval < 1 ||
 169  169                              interval > INTERVAL_MAX) {
 170  170                                  pt_usage();
 171  171                                  exit(EXIT_USAGE);
 172  172                          }
 173  173  
 174  174                          break;
 175  175                  case 'v':
 176  176                          if (PT_ON_CPU || PT_ON_VERBOSE) {
 177  177                                  pt_usage();
 178  178                                  exit(EXIT_USAGE);
↓ open down ↓ 243 lines elided ↑ open up ↑
XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX