Module: ngircd.git Branch: master Commit: 605b6a67bc7f41432d25ab646c232e347fd7a33f URL: http://ngircd.barton.de/cgi-bin/gitweb.cgi?p=ngircd.git&a=commit;h=605b6...
Author: Florian Westphal fw@strlen.de 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
---
src/ngircd/irc-channel.c | 2 ++ src/ngircd/ngircd.c | 4 +--- 2 files changed, 3 insertions(+), 3 deletions(-)
diff --git a/src/ngircd/irc-channel.c b/src/ngircd/irc-channel.c index 476c313..66b3eeb 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 4cac909..58383cf 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();
ngircd-commits@lists.barton.de