libnm-util: fix WEP key type comparison in nm_utils_wep_key_valid()

This commit is contained in:
Jiří Klimeš 2013-05-03 10:09:45 +02:00
parent 22d2f571ce
commit bfc20af513

View file

@ -827,7 +827,8 @@ nm_utils_wep_key_valid (const char *key, NMWepKeyType wep_type)
return FALSE;
keylen = strlen (key);
if (wep_type == NM_WEP_KEY_TYPE_KEY || NM_WEP_KEY_TYPE_UNKNOWN) {
if ( wep_type == NM_WEP_KEY_TYPE_KEY
|| wep_type == NM_WEP_KEY_TYPE_UNKNOWN) {
if (keylen == 10 || keylen == 26) {
/* Hex key */
for (i = 0; i < keylen; i++) {