Fixed ifc initialisation bug.

This commit is contained in:
pdw
2002-08-27 18:54:48 +00:00
parent 422ee03783
commit 3acd6b390c

View File

@@ -25,7 +25,7 @@ char optstr[] = "+i:f:n:dhpb";
static char *get_first_interface(void) { static char *get_first_interface(void) {
int s, size = 1; int s, size = 1;
struct ifreq *ifr; struct ifreq *ifr;
struct ifconf ifc; struct ifconf ifc = {0};
char *i = NULL; char *i = NULL;
/* Use if_nameindex(3) instead? */ /* Use if_nameindex(3) instead? */
if ((s = socket(AF_INET, SOCK_DGRAM, 0)) == -1) if ((s = socket(AF_INET, SOCK_DGRAM, 0)) == -1)