[epiphany/mcatanzaro/cppcheck: 5/11] embed-utils: Remove redundant conditions



commit 5006232515f26865ad0cc6a3f86b2e8e1638fa8e
Author: Michael Catanzaro <mcatanzaro gnome org>
Date:   Sun Nov 17 09:21:40 2019 -0600

    embed-utils: Remove redundant conditions
    
    This placates cppcheck

 embed/ephy-embed-utils.c | 6 +++---
 1 file changed, 3 insertions(+), 3 deletions(-)
---
diff --git a/embed/ephy-embed-utils.c b/embed/ephy-embed-utils.c
index 1a7dcc83a..f32177ef4 100644
--- a/embed/ephy-embed-utils.c
+++ b/embed/ephy-embed-utils.c
@@ -292,9 +292,9 @@ ephy_embed_utils_normalize_address (const char *address)
      * handler for the scheme, and since we'll fail for localhost
      * and IP, we'd fallback to loading it as a domain. */
     if (!uri ||
-        (uri && !g_strcmp0 (uri->scheme, "localhost")) ||
-        (uri && g_hostname_is_ip_address (uri->scheme)) ||
-        (uri && is_host_with_port (address)))
+        !g_strcmp0 (uri->scheme, "localhost") ||
+        g_hostname_is_ip_address (uri->scheme) ||
+        is_host_with_port (address))
       effective_address = g_strconcat ("http://";, address, NULL);
   }
 


[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]