[network-manager-openvpn] properties: drop unnecessary NULL check



commit fda50fd54ae2e04294c99f37ae5b635b416648c6
Author: Lubomir Rintel <lkundrak v3 sk>
Date:   Tue Mar 8 13:58:26 2016 +0100

    properties: drop unnecessary NULL check
    
    CID 59914 (#1 of 1): Dereference before null check (REVERSE_INULL)
    check_after_deref: Null-checking host suggests that it may be null, but it
    has already been dereferenced on all paths leading to the check.

 properties/nm-openvpn.c |    2 +-
 1 files changed, 1 insertions(+), 1 deletions(-)
---
diff --git a/properties/nm-openvpn.c b/properties/nm-openvpn.c
index c47fd8b..57bdf34 100644
--- a/properties/nm-openvpn.c
+++ b/properties/nm-openvpn.c
@@ -109,7 +109,7 @@ check_gateway_entry (const char *str)
                        *proto++ = '\0';
 
                /* check hostname */
-               if (!host || !*host)
+               if (!*host)
                        goto out;
                /* check port */
                if (port && *port) {


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