mdns: fix a compilation warning / copy-paste error
authorFerry Huberts <ferry.huberts@pelagic.nl>
Thu, 11 Oct 2012 08:49:09 +0000 (10:49 +0200)
committerFerry Huberts <ferry.huberts@pelagic.nl>
Thu, 11 Oct 2012 08:49:49 +0000 (10:49 +0200)
src/RouterElection.c: In function ‘electTimer’:
src/RouterElection.c:177:17: warning: ‘tmp’ may be used uninitialized in this function [-Wuninitialized]

Signed-off-by: Ferry Huberts <ferry.huberts@pelagic.nl>
lib/mdns/src/RouterElection.c

index f557eaf..3e69e9b 100644 (file)
@@ -174,7 +174,7 @@ void electTimer (void *foo __attribute__ ((unused))){
     else{
       ROUTER_ELECTION_ENTRIES(tmp6, iterator6){
         if(tmp6->network_id == NETWORK_ID)
-          if(tmp->skfd == walker->electionSkfd)
+          if(tmp6->skfd == walker->electionSkfd)
             if(memcmp(&tmp6->router_id, &ROUTER_ID.v6, sizeof(struct in6_addr)) < 0)
               walker->isActive = 0;
         tmp6->ttl = ((tmp6->ttl)- 1);