Cleanup inelegant calloc(3) introduced in r310984.
This commit is contained in:
parent
eca80cd0ae
commit
3795066839
Notes:
svn2git
2020-12-20 02:59:44 +00:00
svn path=/head/; revision=311102
@ -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 */
|
||||
|
Loading…
Reference in New Issue
Block a user