]> granicus.if.org Git - libevent/commitdiff
Remote some dead code from dns-example.c
authorSebastian Hahn <sebastian@torproject.org>
Sat, 23 Apr 2011 00:20:59 +0000 (02:20 +0200)
committerSebastian Hahn <sebastian@torproject.org>
Sat, 23 Apr 2011 00:20:59 +0000 (02:20 +0200)
Found by Dave Heart

sample/dns-example.c

index 2845cb993169bff631cbdcbf5d61c47247ed4c5d..f2c1e020a0072ae76cda95ed5a215adb77102fb6 100644 (file)
@@ -72,7 +72,6 @@ static void
 gai_callback(int err, struct evutil_addrinfo *ai, void *arg)
 {
        const char *name = arg;
-       struct evutil_addrinfo *ai_first = NULL;
        int i;
        if (err) {
                printf("%s: %s\n", name, evutil_gai_strerror(err));
@@ -95,8 +94,6 @@ gai_callback(int err, struct evutil_addrinfo *ai, void *arg)
                        printf("[%d] %s: %s\n",i,name,buf);
                }
        }
-       if (ai_first)
-               evutil_freeaddrinfo(ai_first);
 }
 
 static void