From bcbbbcad456167564c545a5a06d71ddd37352219 Mon Sep 17 00:00:00 2001 From: Tomas Chvatal Date: Sat, 2 May 2009 22:08:25 +0200 Subject: Merge two ifs with same result --- src/base/server.c | 8 ++------ 1 file changed, 2 insertions(+), 6 deletions(-) (limited to 'src') diff --git a/src/base/server.c b/src/base/server.c index 10cde36..cdd1487 100644 --- a/src/base/server.c +++ b/src/base/server.c @@ -87,13 +87,9 @@ static proto_cmd_server_t *findCmdProto(client_t * client, char *msg) thisCmd = &proto_cmd_list[i]; if (len >= thisCmd->len && strncmp(msg, thisCmd->name, thisCmd->len) == 0) { - if (thisCmd->tux == 1 && client->tux == NULL) { + if ((thisCmd->tux == 1 && client->tux == NULL) || + (thisCmd->tux == 0 && client->tux != NULL)) return NULL; - } - - if (thisCmd->tux == 0 && client->tux != NULL) { - return NULL; - } return thisCmd; } -- cgit v1.2.3