summaryrefslogtreecommitdiff
path: root/legacy/eeze
diff options
context:
space:
mode:
authorGustavo Sverzut Barbieri <barbieri@gmail.com>2012-01-19 15:55:03 +0000
committerGustavo Sverzut Barbieri <barbieri@gmail.com>2012-01-19 15:55:03 +0000
commit12af485e2695582921b203272f5c7ebf3c80ad42 (patch)
treec83aef1852b2c77b98205140bb729627be624b57 /legacy/eeze
parent54fdc48d6a69bcf4f56ce8490669d666e73ad3cc (diff)
eeze: fix warnings.
ioctls just have 3 elements... and 'i' must be reset before using it again for ipv6. SVN revision: 67351
Diffstat (limited to 'legacy/eeze')
-rw-r--r--legacy/eeze/src/lib/eeze_net.c7
1 files 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)
43Eeze_Net * 43Eeze_Net *
44eeze_net_new(const char *name) 44eeze_net_new(const char *name)
45{ 45{
46 const char *syspath; 46 const char *syspath = NULL;
47 const char *idx; 47 const char *idx;
48 _udev_enumerate *en; 48 _udev_enumerate *en;
49 _udev_list_entry *devs, *cur; 49 _udev_list_entry *devs, *cur;
50 _udev_device *device; 50 _udev_device *device = NULL;
51 Eeze_Net *net; 51 Eeze_Net *net;
52 52
53 net = eina_hash_find(eeze_nets, name); 53 net = eina_hash_find(eeze_nets, name);
@@ -163,7 +163,7 @@ eeze_net_scan(Eeze_Net *net)
163 struct sockaddr_in6 *sa6; 163 struct sockaddr_in6 *sa6;
164#endif 164#endif
165 int sock; 165 int sock;
166 int ioctls[5] = {SIOCGIFADDR, SIOCGIFBRDADDR, SIOCGIFNETMASK}, *i = ioctls; 166 int ioctls[3] = {SIOCGIFADDR, SIOCGIFBRDADDR, SIOCGIFNETMASK}, *i = ioctls;
167 struct ifreq ifr; 167 struct ifreq ifr;
168 struct sockaddr_in *sa; 168 struct sockaddr_in *sa;
169 169
@@ -192,6 +192,7 @@ eeze_net_scan(Eeze_Net *net)
192 192
193 close(sock); 193 close(sock);
194#ifdef HAVE_IPV6 194#ifdef HAVE_IPV6
195 i = ioctls;
195 ifr.ifr_addr.sa_family = AF_INET6; 196 ifr.ifr_addr.sa_family = AF_INET6;
196 sock = socket(AF_INET6, SOCK_DGRAM, 0); 197 sock = socket(AF_INET6, SOCK_DGRAM, 0);
197 if (sock < 0) return EINA_FALSE; 198 if (sock < 0) return EINA_FALSE;