Print this page
smatch clean rtld
@@ -1718,11 +1718,11 @@
* should any failures occur.
*/
rtsz = S_DROUND(sizeof (Rt_map));
epsz = S_DROUND(sizeof (Rt_elfp));
lmsz = rtsz + epsz + dynsz;
- if ((lmp = calloc(lmsz, 1)) == NULL)
+ if ((lmp = calloc(1, lmsz)) == NULL)
return (NULL);
ELFPRV(lmp) = (void *)((uintptr_t)lmp + rtsz);
DYNINFO(lmp) = (Dyninfo *)((uintptr_t)lmp + rtsz + epsz);
LMSIZE(lmp) = lmsz;
@@ -2353,11 +2353,11 @@
* family searches.
*/
if (CAPCHAIN(lmp)) {
Capchain *capchain;
- if ((capchain = calloc(CAPCHAINSZ(lmp), 1)) == NULL)
+ if ((capchain = calloc(1, CAPCHAINSZ(lmp))) == NULL)
return (NULL);
(void) memcpy(capchain, CAPCHAIN(lmp), CAPCHAINSZ(lmp));
CAPCHAIN(lmp) = capchain;
}