Cleanup inelegant calloc(3) introduced in r310984.

This commit is contained in:
Pedro F. Giffuni 2017-01-02 15:17:33 +00:00
parent eca80cd0ae
commit 3795066839
Notes: svn2git 2020-12-20 02:59:44 +00:00
svn path=/head/; revision=311102

View File

@ -691,7 +691,7 @@ reorder(struct addrinfo *sentinel)
return(n);
/* allocate a temporary array for sort and initialization of it. */
if ((aio = calloc(1, sizeof(*aio) * n)) == NULL)
if ((aio = calloc(n, sizeof(*aio))) == NULL)
return(n); /* give up reordering */
/* retrieve address selection policy from the kernel */