[PATCH 2/3] Allow the 'mac_strup' input argument to be NULL.

Javier Fernandez jfernandez at igalia.com
Mon Aug 23 08:49:06 PDT 2010


---
 src/connectivity.c |    5 ++++-
 1 files changed, 4 insertions(+), 1 deletions(-)

diff --git a/src/connectivity.c b/src/connectivity.c
index 96d83ab..3bc8a6c 100644
--- a/src/connectivity.c
+++ b/src/connectivity.c
@@ -206,6 +206,10 @@ get_router_mac_fallback (char **mac)
 static char *
 mac_strup (char *mac)
 {
+	if (mac == NULL) {
+		return NULL;
+	}
+
 	guint i;
 	for (i = 0; mac[i] != '\0' ; i++) {
 		if (g_ascii_isalpha (mac[i]))
@@ -231,7 +235,6 @@ geoclue_connectivity_get_router_mac (GeoclueConnectivity *self)
 				break;
 			g_usleep (G_USEC_PER_SEC / 10);
 		}
-		return mac_strup (mac);
 	}
 
 	return GEOCLUE_CONNECTIVITY_GET_INTERFACE (self)->get_router_mac (self);
-- 
1.6.3.3



More information about the GeoClue mailing list