From f4eebcb0c75b5dee290a45d6559600404b43a204 Mon Sep 17 00:00:00 2001 From: michael Date: Fri, 26 Dec 2014 21:16:04 +0000 Subject: [PATCH] - 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 --- src/negcache.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) 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; -- 2.30.2