From 0afdbfaf03d64522356b0a0abe178ae236057e7e Mon Sep 17 00:00:00 2001 From: James Booth Date: Thu, 25 Sep 2014 20:59:59 +0100 Subject: [PATCH] Removed NULL check when checking roster for nick --- src/muc.c | 8 ++------ 1 file changed, 2 insertions(+), 6 deletions(-) diff --git a/src/muc.c b/src/muc.c index 3c937670..413ba84c 100644 --- a/src/muc.c +++ b/src/muc.c @@ -437,13 +437,9 @@ muc_nick_in_roster(const char * const room, const char * const nick) { ChatRoom *chat_room = g_hash_table_lookup(rooms, room); - if (chat_room != NULL) { + if (chat_room) { PContact contact = g_hash_table_lookup(chat_room->roster, nick); - if (contact != NULL) { - return TRUE; - } else { - return FALSE; - } + return (contact != NULL); } return FALSE;