mirror of
https://git.FreeBSD.org/src.git
synced 2024-12-14 10:09:48 +00:00
ypbind(8): let calloc(3) do the multiplying.
This commit is contained in:
parent
4b6fa244b2
commit
85f104954a
Notes:
svn2git
2020-12-20 02:59:44 +00:00
svn path=/head/; revision=315215
@ -226,7 +226,7 @@ __yp_ping(struct in_addr *restricted_addrs, int cnt, char *dom, short *port)
|
||||
int validsrvs = 0;
|
||||
|
||||
/* Set up handles. */
|
||||
reqs = calloc(1, sizeof(struct ping_req *) * cnt);
|
||||
reqs = calloc(cnt, sizeof(struct ping_req *));
|
||||
xid_seed = time(NULL) ^ getpid();
|
||||
|
||||
for (i = 0; i < cnt; i++) {
|
||||
|
Loading…
Reference in New Issue
Block a user