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

This commit is contained in:
Pedro F. Giffuni 2017-03-13 20:51:00 +00:00
parent 4b6fa244b2
commit 85f104954a
Notes: svn2git 2020-12-20 02:59:44 +00:00
svn path=/head/; revision=315215

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