Source-Changes-HG archive

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]

[src/trunk]: src/external/apache2/mDNSResponder/dist/mDNSPosix use calloc, re...



details:   https://anonhg.NetBSD.org/src/rev/9df7ec2d46ed
branches:  trunk
changeset: 805744:9df7ec2d46ed
user:      christos <christos%NetBSD.org@localhost>
date:      Fri Jan 16 20:16:36 2015 +0000

description:
use calloc, remove cast.

diffstat:

 external/apache2/mDNSResponder/dist/mDNSPosix/mDNSUNP.c |  2 +-
 1 files changed, 1 insertions(+), 1 deletions(-)

diffs (12 lines):

diff -r f0cdfb25da5a -r 9df7ec2d46ed external/apache2/mDNSResponder/dist/mDNSPosix/mDNSUNP.c
--- a/external/apache2/mDNSResponder/dist/mDNSPosix/mDNSUNP.c   Fri Jan 16 20:13:34 2015 +0000
+++ b/external/apache2/mDNSResponder/dist/mDNSPosix/mDNSUNP.c   Fri Jan 16 20:16:36 2015 +0000
@@ -221,7 +221,7 @@
     lastlen = 0;
     len = 100 * sizeof(struct ifreq);   /* initial buffer size guess */
     for ( ; ; ) {
-        buf = (char*)malloc(len);
+        buf = calloc(len, 1);
         if (buf == NULL) {
             goto gotError;
         }



Home | Main Index | Thread Index | Old Index