]> granicus.if.org Git - libevent/commitdiff
sample/dns-example: fix compiler warning (getopt() returns an int)
authorDavid Disseldorp <ddiss@suse.de>
Mon, 20 Feb 2017 15:55:57 +0000 (16:55 +0100)
committerAzat Khuzhin <azat@libevent.org>
Sat, 2 Feb 2019 12:13:48 +0000 (15:13 +0300)
Signed-off-by: David Disseldorp <ddiss@suse.de>
Closes: #449
(cherry picked from commit 55cadb2b03c95505f6adbb836f0e975772d80bce)

sample/dns-example.c

index fb705664aa81098f489ba12fcbe61fa1ce14e34c..e180edfecce1d422e4f8e6c9a8afa2db5865f461 100644 (file)
@@ -154,12 +154,12 @@ main(int c, char **v) {
                const char *ns;
        };
        struct options o;
-       char opt;
+       int opt;
        struct event_base *event_base = NULL;
        struct evdns_base *evdns_base = NULL;
 
        memset(&o, 0, sizeof(o));
-       
+
        if (c < 2) {
                fprintf(stderr, "syntax: %s [-x] [-v] [-c resolv.conf] [-s ns] hostname\n", v[0]);
                fprintf(stderr, "syntax: %s [-T]\n", v[0]);