about summary refs log tree commit diff
path: root/src
diff options
context:
space:
mode:
authorAlexander Barton <alex@barton.de>2014-09-10 13:03:30 +0200
committerAlexander Barton <alex@barton.de>2014-09-10 13:03:30 +0200
commitffad2da835e26a1a457d4f4a16acf6797d4cc71e (patch)
tree98b24d169a5afed40ea5959e46380dd7dda3460f /src
parent3f1547ecdec24fd685f05e40733ae0d907bcb9d8 (diff)
downloadngircd-ffad2da835e26a1a457d4f4a16acf6797d4cc71e.tar.gz
ngircd-ffad2da835e26a1a457d4f4a16acf6797d4cc71e.zip
Correctly check that a server has a valid hostname and port
David Binderman <dcb314@hotmail.com> reported the following compiler warning,
which is a real bug in ngIRCd, thanks!

conn.c:2077:55: warning: logical not is only applied to the left hand
                         side of comparison [-Wlogical-not-parentheses]
Diffstat (limited to 'src')
-rw-r--r--src/ngircd/conn.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/src/ngircd/conn.c b/src/ngircd/conn.c
index 5c175dfd..62561544 100644
--- a/src/ngircd/conn.c
+++ b/src/ngircd/conn.c
@@ -1904,7 +1904,7 @@ Check_Servers(void)
 	for (i = 0; i < MAX_SERVERS; i++) {
 		if (Conf_Server[i].conn_id != NONE)
 			continue;	/* Already establishing or connected */
-		if (!Conf_Server[i].host[0] || !Conf_Server[i].port > 0)
+		if (!Conf_Server[i].host[0] || Conf_Server[i].port <= 0)
 			continue;	/* No host and/or port configured */
 		if (Conf_Server[i].flags & CONF_SFLAG_DISABLED)
 			continue;	/* Disabled configuration entry */