[Author Prev][Author Next][Thread Prev][Thread Next][Author Index][Thread Index]

[Libevent-users] check for errors from evdns_base_resolv_conf_parse() is not correct



Hello.

It seems libevent check for errors from evdns_base_resolv_conf_parse()
is not correct:

evdns_base_resolv_conf_parse() returns positive error codes as described here:
http://www.wangafu.net/~nickm/libevent-2.1/doxygen/html/dns_8h.html#a7e3a053e25ae7c045944a5db0947babb

Implementation:
https://github.com/libevent/libevent/blob/194a5d822651c03fc988c1bf087e65ed20f453f7/evdns.c#L3660

But callers check for "-1":
https://github.com/libevent/libevent/blob/194a5d822651c03fc988c1bf087e65ed20f453f7/evdns.c#L4035
or for negative int:
https://github.com/libevent/libevent/blob/194a5d822651c03fc988c1bf087e65ed20f453f7/sample/dns-example.c#L228
***********************************************************************
To unsubscribe, send an e-mail to majordomo@xxxxxxxxxxxxx with
unsubscribe libevent-users    in the body.