[network-manager-applet] editor: avoid unused variable with < 1.6



commit 0b73e93d4b6c8e0dd4666014a9dd6bd9c2a61439
Author: Lubomir Rintel <lkundrak v3 sk>
Date:   Thu Dec 22 15:20:28 2016 +0100

    editor: avoid unused variable with < 1.6

 src/connection-editor/connection-helpers.c |    4 +++-
 1 files changed, 3 insertions(+), 1 deletions(-)
---
diff --git a/src/connection-editor/connection-helpers.c b/src/connection-editor/connection-helpers.c
index 39e461f..3ad0975 100644
--- a/src/connection-editor/connection-helpers.c
+++ b/src/connection-editor/connection-helpers.c
@@ -791,14 +791,16 @@ delete_connection (GtkWindow *parent_window,
 gboolean
 connection_supports_proxy (NMConnection *connection)
 {
+#if NM_LIBNM_COMPAT_PROXY_SUPPORTED
        NMSettingConnection *s_con;
 
        g_return_val_if_fail (NM_IS_CONNECTION (connection), FALSE);
 
-#if NM_LIBNM_COMPAT_PROXY_SUPPORTED
        s_con = nm_connection_get_setting_connection (connection);
        return (nm_setting_connection_get_slave_type (s_con) == NULL);
 #else
+       g_return_val_if_fail (NM_IS_CONNECTION (connection), FALSE);
+
        return FALSE;
 #endif
 }


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