Print this page
smatch clean rtld

Split Close
Expand all
Collapse all
          --- old/usr/src/cmd/sgs/rtld/common/cap.c
          +++ new/usr/src/cmd/sgs/rtld/common/cap.c
↓ open down ↓ 1001 lines elided ↑ open up ↑
1002 1002                  avl_index_t     where;
1003 1003                  PathNode        *pnp;
1004 1004                  uint_t          hash = sgs_str_hash(name);
1005 1005  
1006 1006                  /*
1007 1007                   * Determine whether this pathname has already been recorded.
1008 1008                   */
1009 1009                  if (pnavl_recorded(&capavl, name, hash, &where))
1010 1010                          continue;
1011 1011  
1012      -                if ((pnp = calloc(sizeof (PathNode), 1)) != NULL) {
     1012 +                if ((pnp = calloc(1, sizeof (PathNode))) != NULL) {
1013 1013                          pnp->pn_name = name;
1014 1014                          pnp->pn_hash = hash;
1015 1015                          avl_insert(capavl, pnp, where);
1016 1016                  }
1017 1017          }
1018 1018  
1019 1019          return (1);
1020 1020  }
1021 1021  
1022 1022  /*
↓ open down ↓ 410 lines elided ↑ open up ↑
XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX