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/mdb/common/modules/genunix/sysevent.c
          +++ new/usr/src/cmd/mdb/common/modules/genunix/sysevent.c
↓ open down ↓ 173 lines elided ↑ open up ↑
 174  174  
 175  175          mdb_printf("%-?p %-24s %-?p\n", addr, class_name,
 176  176              clist.cl_subclass_list);
 177  177  
 178  178          return (DCMD_OK);
 179  179  }
 180  180  
 181  181  int
 182  182  sysevent_subclass_list_walk_init(mdb_walk_state_t *wsp)
 183  183  {
 184      -        if (wsp->walk_addr == NULL) {
      184 +        if (wsp->walk_addr == (uintptr_t)NULL) {
 185  185                  mdb_warn("sysevent_subclass_list does not support global "
 186  186                      "walks");
 187  187                  return (WALK_ERR);
 188  188          }
 189  189  
 190  190          wsp->walk_data = mdb_alloc(sizeof (subclass_lst_t), UM_SLEEP);
 191  191          return (WALK_NEXT);
 192  192  }
 193  193  
 194  194  int
 195  195  sysevent_subclass_list_walk_step(mdb_walk_state_t *wsp)
 196  196  {
 197  197          int status;
 198  198  
 199      -        if (wsp->walk_addr == NULL)
      199 +        if (wsp->walk_addr == (uintptr_t)NULL)
 200  200                  return (WALK_DONE);
 201  201  
 202  202          if (mdb_vread(wsp->walk_data, sizeof (subclass_lst_t),
 203  203              wsp->walk_addr) == -1) {
 204  204                  mdb_warn("failed to read class list at %p", wsp->walk_addr);
 205  205                  return (WALK_ERR);
 206  206          }
 207  207  
 208  208          status = wsp->walk_callback(wsp->walk_addr, wsp->walk_data,
 209  209              wsp->walk_cbdata);
↓ open down ↓ 13 lines elided ↑ open up ↑
 223  223  typedef struct class_walk_data {
 224  224          int     hash_index;
 225  225          class_lst_t *hash_tbl[CLASS_HASH_SZ + 1];
 226  226  } class_walk_data_t;
 227  227  
 228  228  int
 229  229  sysevent_class_list_walk_init(mdb_walk_state_t *wsp)
 230  230  {
 231  231          class_walk_data_t *cl_walker;
 232  232  
 233      -        if (wsp->walk_addr == NULL) {
      233 +        if (wsp->walk_addr == (uintptr_t)NULL) {
 234  234                  mdb_warn("sysevent_class_list does not support global walks");
 235  235                  return (WALK_ERR);
 236  236          }
 237  237  
 238  238          cl_walker = mdb_zalloc(sizeof (class_walk_data_t), UM_SLEEP);
 239  239          if (mdb_vread(cl_walker->hash_tbl,
 240  240              sizeof (cl_walker->hash_tbl), wsp->walk_addr) == -1) {
 241  241                  mdb_warn("failed to read class hash table at %p",
 242  242                      wsp->walk_addr);
 243  243                  return (WALK_ERR);
↓ open down ↓ 8 lines elided ↑ open up ↑
 252  252  int
 253  253  sysevent_class_list_walk_step(mdb_walk_state_t *wsp)
 254  254  {
 255  255          int status = WALK_NEXT;
 256  256          class_walk_data_t *cl_walker;
 257  257          class_lst_t clist;
 258  258  
 259  259          cl_walker = (class_walk_data_t *)wsp->walk_data;
 260  260  
 261  261          /* Skip over empty class table entries */
 262      -        if (wsp->walk_addr != NULL) {
      262 +        if (wsp->walk_addr != (uintptr_t)NULL) {
 263  263                  if (mdb_vread(&clist, sizeof (class_lst_t),
 264  264                      wsp->walk_addr) == -1) {
 265  265                          mdb_warn("failed to read class list at %p",
 266  266                              wsp->walk_addr);
 267  267                          return (WALK_ERR);
 268  268                  }
 269  269  
 270  270                  status = wsp->walk_callback(wsp->walk_addr, NULL,
 271  271                      wsp->walk_cbdata);
 272  272                  wsp->walk_addr = (uintptr_t)clist.cl_next;
↓ open down ↓ 227 lines elided ↑ open up ↑
XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX