repo: ngircd
action: commit
revision: 
path_from: 
revision_from: 605b6a67bc7f41432d25ab646c232e347fd7a33f:
path_to: 
revision_to: 
git.thebackupbox.net
ngircd
git clone git://git.thebackupbox.net/ngircd
commit 605b6a67bc7f41432d25ab646c232e347fd7a33f
Author: Florian Westphal 
Date:   Fri May 6 20:31:56 2011 +0200

    fix clang warning about dead stores

    clang 'scan-build':
    Value stored to 'r' is never read
    Value stored to 'fd' is never read

diff --git a/src/ngircd/irc-channel.c b/src/ngircd/irc-channel.c
index 476c313835f337b01bb0688c9a9a1e8d97135a83..
index ..66b3eeb24ed9677d4950709ac5fc06afe6c42b50 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 4cac909d8f02e3f4d60593693ee6855b49e7f338..
index ..58383cfaac51924b6782be3d7a08bf7a96a1056e 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();

-----END OF PAGE-----