diff options
author | Marcel Holtmann <marcel@holtmann.org> | 2012-07-15 19:31:28 -0300 |
---|---|---|
committer | Marcel Holtmann <marcel@holtmann.org> | 2012-07-15 19:31:28 -0300 |
commit | 3118b6115b20e0dde831a74dca7045faed5863ae (patch) | |
tree | 57610a8d5dfce809f4305780810ba1b4900491cd /gsupplicant | |
parent | 88431c2fdf1f1127e8d75d5ee28eb76ee322f583 (diff) | |
download | connman-3118b6115b20e0dde831a74dca7045faed5863ae.tar.gz connman-3118b6115b20e0dde831a74dca7045faed5863ae.tar.bz2 connman-3118b6115b20e0dde831a74dca7045faed5863ae.zip |
gsupplicant: Avoid shadowing key variable
Diffstat (limited to 'gsupplicant')
-rw-r--r-- | gsupplicant/supplicant.c | 9 |
1 files changed, 5 insertions, 4 deletions
diff --git a/gsupplicant/supplicant.c b/gsupplicant/supplicant.c index dffc1d86..be429586 100644 --- a/gsupplicant/supplicant.c +++ b/gsupplicant/supplicant.c @@ -2174,20 +2174,21 @@ static void wps_credentials(const char *key, DBusMessageIter *iter, if (g_strcmp0(key, "Key") == 0) { DBusMessageIter array; - unsigned char *key; + unsigned char *key_val; int key_len; dbus_message_iter_recurse(iter, &array); - dbus_message_iter_get_fixed_array(&array, &key, &key_len); + dbus_message_iter_get_fixed_array(&array, &key_val, &key_len); g_free(interface->wps_cred.key); interface->wps_cred.key = g_try_malloc0( - sizeof(char) * key_len+1); + sizeof(char) * key_len + 1); if (interface->wps_cred.key == NULL) return; - memcpy(interface->wps_cred.key, key, sizeof(char) * key_len); + memcpy(interface->wps_cred.key, key_val, + sizeof(char) * key_len); SUPPLICANT_DBG("WPS key present"); } else if (g_strcmp0(key, "SSID") == 0) { |