about summary refs log tree commit diff
diff options
context:
space:
mode:
authorFlorian Westphal <fw@strlen.de>2011-05-06 20:31:56 +0200
committerFlorian Westphal <fw@strlen.de>2011-05-06 20:31:56 +0200
commit605b6a67bc7f41432d25ab646c232e347fd7a33f (patch)
tree39e22803298b87be3151c3240720cb32bd9ab952
parent10c7a156876f75ab5e21385d2775143dceefe2e9 (diff)
downloadngircd-605b6a67bc7f41432d25ab646c232e347fd7a33f.tar.gz
ngircd-605b6a67bc7f41432d25ab646c232e347fd7a33f.zip
fix clang warning about dead stores
clang 'scan-build':
Value stored to 'r' is never read
Value stored to 'fd' is never read
-rw-r--r--src/ngircd/irc-channel.c2
-rw-r--r--src/ngircd/ngircd.c4
2 files changed, 3 insertions, 3 deletions
diff --git a/src/ngircd/irc-channel.c b/src/ngircd/irc-channel.c
index 476c3138..66b3eeb2 100644
--- a/src/ngircd/irc-channel.c
+++ b/src/ngircd/irc-channel.c
@@ -526,6 +526,8 @@ IRC_TOPIC( CLIENT *Client, REQUEST *Req )
 					       Client_ID(Client),
 					       Channel_Name(chan), topic);
 #ifndef STRICT_RFC
+			if (!r)
+				return r;
 			r = IRC_WriteStrClient(from, RPL_TOPICSETBY_MSG,
 					       Client_ID(Client),
 					       Channel_Name(chan),
diff --git a/src/ngircd/ngircd.c b/src/ngircd/ngircd.c
index 4cac909d..58383cfa 100644
--- a/src/ngircd/ngircd.c
+++ b/src/ngircd/ngircd.c
@@ -706,10 +706,8 @@ NGIRCd_Init( bool NGIRCd_NoDaemon )
 
 		/* Detach stdin, stdout and stderr */
 		Setup_FDStreams(fd);
-		if (fd > 2) {
+		if (fd > 2)
 			close(fd);
-			fd = -1;
-		}
 	}
 	pid = getpid();