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/lib/fm/topo/modules/i86pc/chip/chip_intel.c
          +++ new/usr/src/lib/fm/topo/modules/i86pc/chip/chip_intel.c
↓ open down ↓ 421 lines elided ↑ open up ↑
 422  422                              strcmp(pname, MCINTEL_NVLIST_NRANKS) != 0 &&
 423  423                              strcmp(pname, MCINTEL_NVLIST_NDIMMS) != 0 &&
 424  424                              strcmp(pname, MCINTEL_NVLIST_VERSTR) != 0 &&
 425  425                              strcmp(pname, MCINTEL_NVLIST_MEM) != 0) {
 426  426                                  (void) nvprop_add(mod, nvp, PGNAME(MCT),
 427  427                                      mcnode);
 428  428                          }
 429  429                  }
 430  430          }
 431  431  
 432      -        return (NULL);
      432 +        return (0);
 433  433  }
 434  434  
 435  435  int
 436  436  mc_node_create(topo_mod_t *mod, uint16_t chip_smbid, tnode_t *pnode,
 437  437      const char *name, nvlist_t *auth)
 438  438  {
 439  439          mc_snapshot_info_t mcs;
 440  440          void *buf = NULL;
 441  441          nvlist_t *nvl;
 442  442          uint8_t ver;
↓ open down ↓ 1 lines elided ↑ open up ↑
 444  444  
 445  445          if (ioctl(mc_fd, MC_IOC_SNAPSHOT_INFO, &mcs) == -1 ||
 446  446              (buf = topo_mod_alloc(mod, mcs.mcs_size)) == NULL ||
 447  447              ioctl(mc_fd, MC_IOC_SNAPSHOT, buf) == -1) {
 448  448  
 449  449                  whinge(mod, NULL, "mc failed to snapshot %s\n",
 450  450                      strerror(errno));
 451  451  
 452  452                  free(buf);
 453  453                  (void) close(mc_fd);
 454      -                return (NULL);
      454 +                return (0);
 455  455          }
 456  456          (void) close(mc_fd);
 457  457          (void) nvlist_unpack(buf, mcs.mcs_size, &nvl, 0);
 458  458          topo_mod_free(mod, buf, mcs.mcs_size);
 459  459  
 460  460          if (nvlist_lookup_uint8(nvl, MCINTEL_NVLIST_VERSTR, &ver) != 0) {
 461  461                  whinge(mod, NULL, "mc nvlist is not versioned\n");
 462  462                  nvlist_free(nvl);
 463      -                return (NULL);
      463 +                return (0);
 464  464          } else if (ver != MCINTEL_NVLIST_VERS0) {
 465  465                  whinge(mod, NULL, "mc nvlist version mismatch\n");
 466  466                  nvlist_free(nvl);
 467      -                return (NULL);
      467 +                return (0);
 468  468          }
 469  469  
 470  470          rc = mc_nb_create(mod, chip_smbid, pnode, name, auth, nvl);
 471  471  
 472  472          nvlist_free(nvl);
 473  473          return (rc);
 474  474  }
 475  475  
 476  476  void
 477  477  onchip_mc_create(topo_mod_t *mod, uint16_t chip_smbid, tnode_t *pnode,
↓ open down ↓ 12 lines elided ↑ open up ↑
XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX