Print this page
smatch clean rtld

*** 394,404 **** } /* * Insert new node in tree. */ ! if ((fpnp = calloc(sizeof (FullPathNode), 1)) == NULL) return (0); fpnp->fpn_node.pn_name = name; fpnp->fpn_node.pn_hash = hash; fpnp->fpn_lmp = lmp; --- 394,404 ---- } /* * Insert new node in tree. */ ! if ((fpnp = calloc(1, sizeof (FullPathNode))) == NULL) return (0); fpnp->fpn_node.pn_name = name; fpnp->fpn_node.pn_hash = hash; fpnp->fpn_lmp = lmp;
*** 457,467 **** } /* * Insert new node in tree. */ ! if ((pnp = calloc(sizeof (PathNode), 1)) != NULL) { pnp->pn_name = name; pnp->pn_hash = hash; avl_insert(nfavl, pnp, where); } } --- 457,467 ---- } /* * Insert new node in tree. */ ! if ((pnp = calloc(1, sizeof (PathNode))) != NULL) { pnp->pn_name = name; pnp->pn_hash = hash; avl_insert(nfavl, pnp, where); } }
*** 504,514 **** return; /* * Insert new node in tree. */ ! if ((pnp = calloc(sizeof (PathNode), 1)) != NULL) { pnp->pn_name = strdup(buffer); pnp->pn_hash = hash; avl_insert(spavl, pnp, where); } } --- 504,514 ---- return; /* * Insert new node in tree. */ ! if ((pnp = calloc(1, sizeof (PathNode))) != NULL) { pnp->pn_name = strdup(buffer); pnp->pn_hash = hash; avl_insert(spavl, pnp, where); } }
*** 2886,2896 **** { int overflow = 0; static int lock = 0; Prfbuf prf; ! if (lock || (nextptr == (errbuf + ERRSIZE))) return; /* * Note: this lock is here to prevent the same thread from recursively * entering itself during a eprintf. ie: during eprintf malloc() fails --- 2886,2896 ---- { int overflow = 0; static int lock = 0; Prfbuf prf; ! if (lock || (nextptr > (errbuf + (ERRSIZE - 1)))) return; /* * Note: this lock is here to prevent the same thread from recursively * entering itself during a eprintf. ie: during eprintf malloc() fails
*** 3124,3134 **** MSG_STR_NL_SIZE); errptr += (size + 1); } } if (lasterr && ((lasterr < errbuf) || ! (lasterr > (errbuf + ERRSIZE)))) { (void) write(2, lasterr, strlen(lasterr)); (void) write(2, MSG_ORIG(MSG_STR_NL), MSG_STR_NL_SIZE); } } --- 3124,3134 ---- MSG_STR_NL_SIZE); errptr += (size + 1); } } if (lasterr && ((lasterr < errbuf) || ! (lasterr > (errbuf + (ERRSIZE - 1))))) { (void) write(2, lasterr, strlen(lasterr)); (void) write(2, MSG_ORIG(MSG_STR_NL), MSG_STR_NL_SIZE); } }