[gnome-bluetooth] lib: Remove unneeded NULL check



commit 246223979cdf7ece830d4c4a7276fd7fc28885a2
Author: Bastien Nocera <hadess hadess net>
Date:   Tue Jan 17 18:54:29 2012 +0000

    lib: Remove unneeded NULL check
    
    The proxy != NULL was checked a little above

 lib/bluetooth-client.c |    6 ++----
 1 files changed, 2 insertions(+), 4 deletions(-)
---
diff --git a/lib/bluetooth-client.c b/lib/bluetooth-client.c
index ea63958..4a94c8e 100644
--- a/lib/bluetooth-client.c
+++ b/lib/bluetooth-client.c
@@ -1761,8 +1761,7 @@ bluetooth_client_connect_service (BluetoothClient     *client,
 	}
 
 	if (connect && table == NULL) {
-		if (proxy != NULL)
-			g_object_unref (proxy);
+		g_object_unref (proxy);
 		goto bail;
 	} else if (connect) {
 		const char *iface_name;
@@ -1778,8 +1777,7 @@ bluetooth_client_connect_service (BluetoothClient     *client,
 
 		if (iface_name == NULL) {
 			g_printerr("No supported services on the '%s' device\n", device);
-			if (proxy != NULL)
-				g_object_unref (proxy);
+			g_object_unref (proxy);
 			goto bail;
 		}
 	}



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