From: michael Date: Fri, 26 Dec 2014 21:16:04 +0000 (+0000) Subject: - negcache.c: better to test for x <= 0 instead of x == 0 when checking the return... X-Git-Tag: 1.0.0beta2~32 X-Git-Url: http://git.serene-ircd.net/?a=commitdiff_plain;h=f4eebcb0c75b5dee290a45d6559600404b43a204;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/branches/1.0.x@5178 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;