about summary refs log tree commit diff stats
path: root/src
diff options
context:
space:
mode:
authorMichael Vetter <jubalh@iodoru.org>2019-11-01 17:35:17 +0100
committerMichael Vetter <jubalh@iodoru.org>2019-11-01 17:35:17 +0100
commitd5212d859389f14409af99b2708c4d002662fb92 (patch)
tree86cc366242c889018a467cb5748e51137b9a4744 /src
parentf71de61b9dc297d111a4ab2ccc77238251659574 (diff)
downloadprofani-tty-d5212d859389f14409af99b2708c4d002662fb92.tar.gz
Remove not needed if blocks
Diffstat (limited to 'src')
-rw-r--r--src/ui/window_list.c11
1 files changed, 2 insertions, 9 deletions
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 <boothj5@gmail.com>
+ * Copyright (C) 2019 Michael Vetter <jubalh@iodoru.org>
  *
  * 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);