From: David Disseldorp Date: Mon, 20 Feb 2017 15:55:57 +0000 (+0100) Subject: sample/dns-example: fix compiler warning (getopt() returns an int) X-Git-Tag: release-2.1.9-beta^2~203 X-Git-Url: https://granicus.if.org/sourcecode?a=commitdiff_plain;h=d3e1c440c9b27bee6b23f5c85dafd99317f5dc52;p=libevent sample/dns-example: fix compiler warning (getopt() returns an int) Signed-off-by: David Disseldorp Closes: #449 (cherry picked from commit 55cadb2b03c95505f6adbb836f0e975772d80bce) --- diff --git a/sample/dns-example.c b/sample/dns-example.c index fb705664..e180edfe 100644 --- a/sample/dns-example.c +++ b/sample/dns-example.c @@ -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]);