From e5ee243ab6ff7f640bdd45a232ad81ed97520a46 Mon Sep 17 00:00:00 2001 From: LemonBoy Date: Tue, 22 Mar 2016 15:45:08 +0100 Subject: Simplify some logic in server_create_conn --- src/core/servers-setup.c | 6 ++---- 1 file changed, 2 insertions(+), 4 deletions(-) (limited to 'src/core') diff --git a/src/core/servers-setup.c b/src/core/servers-setup.c index 990d2d4b..0cecfece 100644 --- a/src/core/servers-setup.c +++ b/src/core/servers-setup.c @@ -321,10 +321,8 @@ server_create_conn(int chat_type, const char *dest, int port, chatrec = chatnet_find(dest); if (chatrec != NULL) { rec = create_chatnet_conn(chatrec->name, port, password, nick); - if (rec != NULL) - return rec; - /* The chatnet has no url to connect to */ - return NULL; + /* If rec is NULL the chatnet has no url to connect to */ + return rec; } chatrec = chatnet == NULL ? NULL : chatnet_find(chatnet); -- cgit v1.2.3