summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorTomas Chvatal <scarabeus@gentoo.org>2009-05-02 22:08:25 +0200
committerTomas Chvatal <scarabeus@gentoo.org>2009-05-02 22:08:25 +0200
commitbcbbbcad456167564c545a5a06d71ddd37352219 (patch)
tree10b02cf8bc837dddab6c8d52fab996b32072865e
parentb214854ed91c2f1368666af9513681c67b9789b4 (diff)
Merge two ifs with same result
-rw-r--r--src/base/server.c8
1 files changed, 2 insertions, 6 deletions
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;
}