From: michael Date: Fri, 26 Dec 2014 21:15:52 +0000 (+0000) Subject: - negcache.c: better to test for x <= 0 instead of x == 0 when checking the return... X-Git-Tag: 1.1.0beta1~259 X-Git-Url: http://git.serene-ircd.net/?a=commitdiff_plain;h=3cdf8bba6bc3e6e6ba03eb8ce3b7143199547044;p=hopm.git - negcache.c: better to test for x <= 0 instead of x == 0 when checking the return value of inet_pton(); just in case. git-svn-id: svn://svn.ircd-hybrid.org/svnroot/hopm/trunk@5177 82007160-df01-0410-b94d-b575c5fd34c7 --- diff --git a/src/negcache.c b/src/negcache.c index 889266c..355e4f0 100644 --- a/src/negcache.c +++ b/src/negcache.c @@ -210,7 +210,7 @@ void negcache_insert(const char *ipstr) struct bopm_sockaddr ip; struct cnode *n; - if (!inet_pton(AF_INET, ipstr, &(ip.sa4.sin_addr))) + if (inet_pton(AF_INET, ipstr, &(ip.sa4.sin_addr)) <= 0) { log_printf("NEGCACHE -> Invalid IPv4 address '%s'", ipstr); return;