git » nmdb » commit 665a0ea

Remove an unnecessary "else".

author Alberto Bertogli
2007-06-04 06:39:33 UTC
committer Alberto Bertogli
2007-06-04 06:39:33 UTC
parent ba7ddb42955224b0964480a7fa7945500d1355ef

Remove an unnecessary "else".

The "else" is misleading, because it makes us think that both the previous
"if" and the "else" blocks continue execution below.

Signed-off-by: Alberto Bertogli <albertito@gmail.com>

nmdb/tcp.c +2 -1

diff --git a/nmdb/tcp.c b/nmdb/tcp.c
index a1d8da1..6887d64 100644
--- a/nmdb/tcp.c
+++ b/nmdb/tcp.c
@@ -416,8 +416,9 @@ static void process_buf(struct tcp_socket *tcpsock,
 			tcpsock->pktsize = totaltoget;
 		}
 		return;
+	}
 
-	} else if (totaltoget < len) {
+	if (totaltoget < len) {
 		/* Got more than one message in the same recv(); save the
 		 * amount of bytes exceeding so we can process it later. */
 		tcpsock->excess = len - totaltoget;