diff options
author | Mark Ellzey <socket@gmail.com> | 2015-06-17 08:05:53 -0700 |
---|---|---|
committer | Mark Ellzey <socket@gmail.com> | 2015-06-17 08:05:53 -0700 |
commit | 620ff243c6141eec5222fbfb0cd633b377efb36f (patch) | |
tree | 325ec0096372677af094d6393debb777254839c5 /sample/dns-example.c | |
parent | bde231d725a4c79979391caeb0e3f171079380f7 (diff) | |
download | libevent-620ff243c6141eec5222fbfb0cd633b377efb36f.tar.gz |
Update dns-example.
There's somebody out there who is going to have a compiler from 1986 who will complain. Better to fix c99 now.
Diffstat (limited to 'sample/dns-example.c')
-rw-r--r-- | sample/dns-example.c | 5 |
1 files changed, 4 insertions, 1 deletions
diff --git a/sample/dns-example.c b/sample/dns-example.c index 67a6ace6..fb705664 100644 --- a/sample/dns-example.c +++ b/sample/dns-example.c @@ -152,11 +152,14 @@ main(int c, char **v) { int servertest; const char *resolv_conf; const char *ns; - } o = { }; + }; + struct options o; char 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]); |