From 12af485e2695582921b203272f5c7ebf3c80ad42 Mon Sep 17 00:00:00 2001 From: Gustavo Sverzut Barbieri Date: Thu, 19 Jan 2012 15:55:03 +0000 Subject: [PATCH] eeze: fix warnings. ioctls just have 3 elements... and 'i' must be reset before using it again for ipv6. SVN revision: 67351 --- legacy/eeze/src/lib/eeze_net.c | 7 ++++--- 1 file changed, 4 insertions(+), 3 deletions(-) diff --git a/legacy/eeze/src/lib/eeze_net.c b/legacy/eeze/src/lib/eeze_net.c index a57f7ac4a4..b415f31a7f 100644 --- a/legacy/eeze/src/lib/eeze_net.c +++ b/legacy/eeze/src/lib/eeze_net.c @@ -43,11 +43,11 @@ eeze_net_shutdown(void) Eeze_Net * eeze_net_new(const char *name) { - const char *syspath; + const char *syspath = NULL; const char *idx; _udev_enumerate *en; _udev_list_entry *devs, *cur; - _udev_device *device; + _udev_device *device = NULL; Eeze_Net *net; net = eina_hash_find(eeze_nets, name); @@ -163,7 +163,7 @@ eeze_net_scan(Eeze_Net *net) struct sockaddr_in6 *sa6; #endif int sock; - int ioctls[5] = {SIOCGIFADDR, SIOCGIFBRDADDR, SIOCGIFNETMASK}, *i = ioctls; + int ioctls[3] = {SIOCGIFADDR, SIOCGIFBRDADDR, SIOCGIFNETMASK}, *i = ioctls; struct ifreq ifr; struct sockaddr_in *sa; @@ -192,6 +192,7 @@ eeze_net_scan(Eeze_Net *net) close(sock); #ifdef HAVE_IPV6 + i = ioctls; ifr.ifr_addr.sa_family = AF_INET6; sock = socket(AF_INET6, SOCK_DGRAM, 0); if (sock < 0) return EINA_FALSE;