diff options
Diffstat (limited to 'src/lib/libc/net/if_indextoname.c')
-rw-r--r-- | src/lib/libc/net/if_indextoname.c | 8 |
1 files changed, 4 insertions, 4 deletions
diff --git a/src/lib/libc/net/if_indextoname.c b/src/lib/libc/net/if_indextoname.c index 1301224444..b3c89fb9a8 100644 --- a/src/lib/libc/net/if_indextoname.c +++ b/src/lib/libc/net/if_indextoname.c | |||
@@ -88,13 +88,13 @@ char *if_indextoname(unsigned int index, char *name) | |||
88 | 88 | ||
89 | ifconf.ifc_len = 0; | 89 | ifconf.ifc_len = 0; |
90 | ifconf.ifc_buf = 0; | 90 | ifconf.ifc_buf = 0; |
91 | if (ioctl(fd, SIOCGIFCONF, (void *)ifconf)) | 91 | if (ioctl(fd, SIOCGIFCONF, (void *)&ifconf)) |
92 | goto ret; | 92 | goto ret; |
93 | if (ifconf->ifc_len < IFNAMSIZ) | 93 | if (ifconf.ifc_len < IFNAMSIZ) |
94 | goto ret; | 94 | goto ret; |
95 | if (!(ifconf->ifc_buf = malloc(ifconf->ifc_len))) | 95 | if (!(ifconf.ifc_buf = malloc(ifconf.ifc_len))) |
96 | goto ret; | 96 | goto ret; |
97 | if (ioctl(fd, SIOCGIFCONF, (void *)ifconf)) | 97 | if (ioctl(fd, SIOCGIFCONF, (void *)&ifconf)) |
98 | goto ret; | 98 | goto ret; |
99 | 99 | ||
100 | i = 0; | 100 | i = 0; |