Author: pfg
Date: Mon Jan  2 15:17:33 2017
New Revision: 311102
URL: https://svnweb.freebsd.org/changeset/base/311102

Log:
  Cleanup inelegant calloc(3) introduced in r310984.

Modified:
  head/lib/libc/net/getaddrinfo.c

Modified: head/lib/libc/net/getaddrinfo.c
==============================================================================
--- head/lib/libc/net/getaddrinfo.c     Mon Jan  2 15:12:11 2017        
(r311101)
+++ head/lib/libc/net/getaddrinfo.c     Mon Jan  2 15:17:33 2017        
(r311102)
@@ -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 */
_______________________________________________
[email protected] mailing list
https://lists.freebsd.org/mailman/listinfo/svn-src-head
To unsubscribe, send any mail to "[email protected]"

Reply via email to