ypbind(8): let calloc(3) do the multiplying.

This commit is contained in:
pfg 2017-03-13 20:51:00 +00:00
parent e5975f99a9
commit 3d6e7fda3e

View File

@ -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++) {