[gnome-control-center/gnome-3-2] network: Remove unneeded initialisations



commit d0b92bfdfe3593bf52e150cbe5254b9dcd9c3247
Author: Bastien Nocera <hadess hadess net>
Date:   Wed Oct 12 15:34:14 2011 +0100

    network: Remove unneeded initialisations
    
    Don't set those variables to NULL, they should be correctly
    initialised later in the code, and it might hide uninitialised ones.

 panels/network/network-dialogs.c |   18 +++++++++---------
 1 files changed, 9 insertions(+), 9 deletions(-)
---
diff --git a/panels/network/network-dialogs.c b/panels/network/network-dialogs.c
index 196c6ef..0e5aae1 100644
--- a/panels/network/network-dialogs.c
+++ b/panels/network/network-dialogs.c
@@ -122,9 +122,9 @@ wireless_dialog_response_cb (GtkDialog *foo,
 {
 	NMAWirelessDialog *dialog = NMA_WIRELESS_DIALOG (foo);
 	WirelessDialogClosure *closure = user_data;
-	NMConnection *connection = NULL, *fuzzy_match = NULL;
-	NMDevice *device = NULL;
-	NMAccessPoint *ap = NULL;
+	NMConnection *connection, *fuzzy_match = NULL;
+	NMDevice *device;
+	NMAccessPoint *ap;
 	GSList *all, *iter;
 
 	if (response != GTK_RESPONSE_OK)
@@ -174,7 +174,7 @@ wireless_dialog_response_cb (GtkDialog *foo,
 		                               NULL);
 	} else {
 		NMSetting *s_con;
-		NMSettingWireless *s_wifi = NULL;
+		NMSettingWireless *s_wifi;
 		const char *mode = NULL;
 
 		/* Entirely new connection */
@@ -260,11 +260,11 @@ cc_network_panel_connect_to_8021x_network (CcNetworkPanel   *panel,
                                            NMDevice         *device,
                                            NMAccessPoint    *ap)
 {
-	NMConnection *connection = NULL;
-	NMSettingConnection *s_con = NULL;
-	NMSettingWireless *s_wifi = NULL;
-	NMSettingWirelessSecurity *s_wsec = NULL;
-	NMSetting8021x *s_8021x = NULL;
+	NMConnection *connection;
+	NMSettingConnection *s_con;
+	NMSettingWireless *s_wifi;
+	NMSettingWirelessSecurity *s_wsec;
+	NMSetting8021x *s_8021x;
 	NM80211ApSecurityFlags wpa_flags, rsn_flags;
 	GtkWidget *dialog;
 	char *uuid;



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