Commit Diff


commit - 10c7a156876f75ab5e21385d2775143dceefe2e9
commit + 605b6a67bc7f41432d25ab646c232e347fd7a33f
blob - 476c313835f337b01bb0688c9a9a1e8d97135a83
blob + 66b3eeb24ed9677d4950709ac5fc06afe6c42b50
--- src/ngircd/irc-channel.c
+++ 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),
blob - 4cac909d8f02e3f4d60593693ee6855b49e7f338
blob + 58383cfaac51924b6782be3d7a08bf7a96a1056e
--- src/ngircd/ngircd.c
+++ 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();