From d5212d859389f14409af99b2708c4d002662fb92 Mon Sep 17 00:00:00 2001 From: Michael Vetter Date: Fri, 1 Nov 2019 17:35:17 +0100 Subject: Remove not needed if blocks --- src/ui/window_list.c | 11 ++--------- 1 file changed, 2 insertions(+), 9 deletions(-) (limited to 'src') diff --git a/src/ui/window_list.c b/src/ui/window_list.c index ce414c2e..5db41b0c 100644 --- a/src/ui/window_list.c +++ b/src/ui/window_list.c @@ -2,6 +2,7 @@ * window_list.c * * Copyright (C) 2012 - 2019 James Booth + * Copyright (C) 2019 Michael Vetter * * This file is part of Profanity. * @@ -368,20 +369,12 @@ wins_get_by_string(const char *str) { if (g_strcmp0(str, "console") == 0) { ProfWin *conswin = wins_get_console(); - if (conswin) { - return conswin; - } else { - return NULL; - } + return conswin; } if (g_strcmp0(str, "xmlconsole") == 0) { ProfXMLWin *xmlwin = wins_get_xmlconsole(); - if (xmlwin) { return (ProfWin*)xmlwin; - } else { - return NULL; - } } ProfChatWin *chatwin = wins_get_chat(str); -- cgit 1.4.1-2-gfad0