use calloc, remove cast.

This commit is contained in:
christos 2015-01-16 20:16:36 +00:00
parent 9a3751381c
commit 98f6460f17
1 changed files with 1 additions and 1 deletions

View File

@ -221,7 +221,7 @@ struct ifi_info *get_ifi_info(int family, int doaliases)
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;
}