Return to rusers.c CVS log | Up to [local] / src / usr.bin / rusers |
version 1.31, 2013/04/03 04:12:49 | version 1.32, 2014/10/08 04:08:47 | ||
---|---|---|---|
|
|
||
/* New entry, allocate space if needed and store. */ | /* New entry, allocate space if needed and store. */ | ||
if (nentries == maxentries) { | if (nentries == maxentries) { | ||
maxentries += 128; | maxentries += 128; | ||
hostinfo = realloc(hostinfo, | hostinfo = reallocarray(hostinfo, maxentries, | ||
sizeof(*hostinfo) * maxentries); | sizeof(*hostinfo)); | ||
if (hostinfo == NULL) | if (hostinfo == NULL) | ||
err(1, NULL); | err(1, NULL); | ||
} | } |