wifi: use const pointer for a ssid buffer
authorKalle Valo <kalle.valo@canonical.com>
Mon, 27 Sep 2010 21:44:34 +0000 (00:44 +0300)
committerSamuel Ortiz <sameo@linux.intel.com>
Mon, 27 Sep 2010 22:07:57 +0000 (00:07 +0200)
A pointer for an ssid buffer was incorrectly stored to a non-const pointer.
After fixing this a unneeded cast can be removed.

plugins/wifi.c

index 984ab0b..a5c10db 100644 (file)
@@ -416,7 +416,7 @@ static void network_added(GSupplicantNetwork *supplicant_network)
        GSupplicantInterface *interface;
        struct wifi_data *wifi;
        const char *name, *path, *identifier, *mode, *security, *group;
-       unsigned char *ssid;
+       const unsigned char *ssid;
        unsigned int ssid_len;
 
        DBG("");
@@ -433,7 +433,7 @@ static void network_added(GSupplicantNetwork *supplicant_network)
        if (wifi == NULL)
                return;
 
-       ssid = (unsigned char *)g_supplicant_network_get_ssid(supplicant_network, &ssid_len);
+       ssid = g_supplicant_network_get_ssid(supplicant_network, &ssid_len);
 
        network = connman_device_get_network(wifi->device, path);