ypbind(8): let calloc(3) do the multiplying.
This commit is contained in:
parent
e5975f99a9
commit
3d6e7fda3e
@ -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…
x
Reference in New Issue
Block a user