mirror of
https://git.kernel.org/pub/scm/network/wireless/iwd.git
synced 2024-10-05 19:08:52 +02:00
iwd: remove unnecessary semicolons
Found with clang's -Wextra-semi-stmt
This commit is contained in:
parent
5d68fbd55f
commit
a47609acbe
@ -199,7 +199,7 @@ do { \
|
|||||||
print_indent(4 + (level) * 4, COLOR_OFF, "", "", color, \
|
print_indent(4 + (level) * 4, COLOR_OFF, "", "", color, \
|
||||||
fmt, ## args)
|
fmt, ## args)
|
||||||
|
|
||||||
#define print_space(x) printf("%*c", (x), ' ');
|
#define print_space(x) printf("%*c", (x), ' ')
|
||||||
|
|
||||||
static void print_packet(const struct timeval *tv, char ident,
|
static void print_packet(const struct timeval *tv, char ident,
|
||||||
const char *color, const char *label,
|
const char *color, const char *label,
|
||||||
@ -3042,10 +3042,13 @@ static void print_p2p_status(unsigned int level, const char *label,
|
|||||||
}
|
}
|
||||||
|
|
||||||
#define CHECK_CAPS_BIT(v, str) \
|
#define CHECK_CAPS_BIT(v, str) \
|
||||||
if (caps & (v)) { \
|
do { \
|
||||||
print_attr(level + 1, "%s", (str)); \
|
if (caps & (v)) { \
|
||||||
caps &= ~(v); \
|
print_attr(level + 1, "%s", (str)); \
|
||||||
}
|
caps &= ~(v); \
|
||||||
|
} \
|
||||||
|
} while(0)
|
||||||
|
|
||||||
static void print_p2p_device_capability(unsigned int level, const char *label,
|
static void print_p2p_device_capability(unsigned int level, const char *label,
|
||||||
const void *data, uint16_t size)
|
const void *data, uint16_t size)
|
||||||
{
|
{
|
||||||
@ -3178,11 +3181,13 @@ static void print_p2p_manageability(unsigned int level, const char *label,
|
|||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
|
||||||
#define CHECK_BIT(v, str) \
|
#define CHECK_BIT(v, str) \
|
||||||
if (val & (v)) { \
|
do { \
|
||||||
print_attr(level + 1, "%s", (str)); \
|
if (val & (v)) { \
|
||||||
val &= ~(v); \
|
print_attr(level + 1, "%s", (str)); \
|
||||||
}
|
val &= ~(v); \
|
||||||
|
} \
|
||||||
|
} while(0)
|
||||||
|
|
||||||
val = *(const uint8_t *) data;
|
val = *(const uint8_t *) data;
|
||||||
|
|
||||||
@ -5239,7 +5244,7 @@ static void print_eap(unsigned int level, const void *data, uint32_t size)
|
|||||||
default:
|
default:
|
||||||
str = "Reserved";
|
str = "Reserved";
|
||||||
break;
|
break;
|
||||||
};
|
}
|
||||||
|
|
||||||
print_attr(level, "Code: %u (%s)", eap[0], str);
|
print_attr(level, "Code: %u (%s)", eap[0], str);
|
||||||
print_attr(level, "Identifier: %u", eap[1]);
|
print_attr(level, "Identifier: %u", eap[1]);
|
||||||
|
@ -469,7 +469,7 @@ int crypto_cipher_key_len(enum crypto_cipher cipher)
|
|||||||
return 16;
|
return 16;
|
||||||
case CRYPTO_CIPHER_BIP:
|
case CRYPTO_CIPHER_BIP:
|
||||||
return 16;
|
return 16;
|
||||||
};
|
}
|
||||||
|
|
||||||
return 0;
|
return 0;
|
||||||
}
|
}
|
||||||
|
@ -279,7 +279,7 @@ uint8_t *eapol_decrypt_key_data(enum ie_rsn_akm_suite akm, const uint8_t *kek,
|
|||||||
break;
|
break;
|
||||||
default:
|
default:
|
||||||
return NULL;
|
return NULL;
|
||||||
};
|
}
|
||||||
|
|
||||||
buf = l_new(uint8_t, expected_len);
|
buf = l_new(uint8_t, expected_len);
|
||||||
|
|
||||||
@ -1674,7 +1674,7 @@ static void eapol_handle_ptk_3_of_4(struct eapol_sm *sm,
|
|||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
|
||||||
igtk_key_index = l_get_le16(igtk);;
|
igtk_key_index = l_get_le16(igtk);
|
||||||
igtk += 2;
|
igtk += 2;
|
||||||
igtk_len -= 2;
|
igtk_len -= 2;
|
||||||
} else
|
} else
|
||||||
@ -1834,7 +1834,7 @@ static void eapol_handle_gtk_1_of_2(struct eapol_sm *sm,
|
|||||||
if (!igtk)
|
if (!igtk)
|
||||||
return;
|
return;
|
||||||
|
|
||||||
igtk_key_index = l_get_le16(igtk);;
|
igtk_key_index = l_get_le16(igtk);
|
||||||
igtk += 2;
|
igtk += 2;
|
||||||
igtk_len -= 2;
|
igtk_len -= 2;
|
||||||
} else
|
} else
|
||||||
|
@ -308,7 +308,7 @@ static bool erp_derive_reauth_keys(const uint8_t *emsk, size_t emsk_len,
|
|||||||
void *r_rk, void *r_ik)
|
void *r_rk, void *r_ik)
|
||||||
{
|
{
|
||||||
char info[256];
|
char info[256];
|
||||||
char *ptr;;
|
char *ptr;
|
||||||
|
|
||||||
ptr = info + l_strlcpy(info, ERP_RRK_LABEL, sizeof(info)) + 1;
|
ptr = info + l_strlcpy(info, ERP_RRK_LABEL, sizeof(info)) + 1;
|
||||||
|
|
||||||
|
@ -1,3 +1,4 @@
|
|||||||
|
|
||||||
/*
|
/*
|
||||||
*
|
*
|
||||||
* Wireless daemon for Linux
|
* Wireless daemon for Linux
|
||||||
@ -508,7 +509,7 @@ static int fils_rx_associate(struct auth_proto *driver, const uint8_t *frame,
|
|||||||
if (!igtk)
|
if (!igtk)
|
||||||
goto invalid_ies;
|
goto invalid_ies;
|
||||||
|
|
||||||
igtk_key_index = l_get_le16(igtk);;
|
igtk_key_index = l_get_le16(igtk);
|
||||||
igtk += 2;
|
igtk += 2;
|
||||||
igtk_len -= 2;
|
igtk_len -= 2;
|
||||||
|
|
||||||
|
10
src/ie.c
10
src/ie.c
@ -915,10 +915,12 @@ static bool ie_build_cipher_suite(uint8_t *data, const uint8_t *oui,
|
|||||||
return false;
|
return false;
|
||||||
}
|
}
|
||||||
|
|
||||||
#define RETURN_AKM(data, oui, id) \
|
#define RETURN_AKM(data, oui, id) \
|
||||||
memcpy((data), (oui), 3); \
|
do { \
|
||||||
(data)[3] = (id); \
|
memcpy((data), (oui), 3); \
|
||||||
return true;
|
(data)[3] = (id); \
|
||||||
|
return true; \
|
||||||
|
} while(0)
|
||||||
|
|
||||||
/* 802.11-2016, Section 9.4.2.25.3 */
|
/* 802.11-2016, Section 9.4.2.25.3 */
|
||||||
static bool ie_build_rsn_akm_suite(uint8_t *data, enum ie_rsn_akm_suite suite)
|
static bool ie_build_rsn_akm_suite(uint8_t *data, enum ie_rsn_akm_suite suite)
|
||||||
|
@ -339,7 +339,7 @@ static int check_crypto()
|
|||||||
l_hashmap_insert(options, "CONFIG_PKCS7_MESSAGE_PARSER", &r);
|
l_hashmap_insert(options, "CONFIG_PKCS7_MESSAGE_PARSER", &r);
|
||||||
l_hashmap_insert(options,
|
l_hashmap_insert(options,
|
||||||
"CONFIG_PKCS8_PRIVATE_KEY_PARSER", &r);
|
"CONFIG_PKCS8_PRIVATE_KEY_PARSER", &r);
|
||||||
};
|
}
|
||||||
|
|
||||||
if (l_hashmap_isempty(options))
|
if (l_hashmap_isempty(options))
|
||||||
goto done;
|
goto done;
|
||||||
|
@ -144,9 +144,9 @@ static bool sae_cn(const uint8_t *kck, uint16_t send_confirm,
|
|||||||
iov[2].iov_base = (void *) e1;
|
iov[2].iov_base = (void *) e1;
|
||||||
iov[2].iov_len = l_ecc_point_get_data(element1, e1, sizeof(e1));
|
iov[2].iov_len = l_ecc_point_get_data(element1, e1, sizeof(e1));
|
||||||
iov[3].iov_base = (void *) s2;
|
iov[3].iov_base = (void *) s2;
|
||||||
iov[3].iov_len = l_ecc_scalar_get_data(scalar2, s2, sizeof(s2));;
|
iov[3].iov_len = l_ecc_scalar_get_data(scalar2, s2, sizeof(s2));
|
||||||
iov[4].iov_base = (void *) e2;
|
iov[4].iov_base = (void *) e2;
|
||||||
iov[4].iov_len = l_ecc_point_get_data(element2, e2, sizeof(e2));;
|
iov[4].iov_len = l_ecc_point_get_data(element2, e2, sizeof(e2));
|
||||||
|
|
||||||
l_checksum_updatev(hmac, iov, 5);
|
l_checksum_updatev(hmac, iov, 5);
|
||||||
|
|
||||||
|
@ -2174,7 +2174,7 @@ static void station_netdev_event(struct netdev *netdev, enum netdev_event event,
|
|||||||
case NETDEV_EVENT_RSSI_LEVEL_NOTIFY:
|
case NETDEV_EVENT_RSSI_LEVEL_NOTIFY:
|
||||||
station_rssi_level_changed(station, l_get_u8(event_data));
|
station_rssi_level_changed(station, l_get_u8(event_data));
|
||||||
break;
|
break;
|
||||||
};
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
static bool station_try_next_bss(struct station *station)
|
static bool station_try_next_bss(struct station *station)
|
||||||
|
@ -262,7 +262,7 @@ static void wsc_enrollee_netdev_event(struct netdev *netdev,
|
|||||||
default:
|
default:
|
||||||
l_debug("Unexpected event: %d", event);
|
l_debug("Unexpected event: %d", event);
|
||||||
break;
|
break;
|
||||||
};
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
static void wsc_enrollee_handshake_event(struct handshake_state *hs,
|
static void wsc_enrollee_handshake_event(struct handshake_state *hs,
|
||||||
|
Loading…
Reference in New Issue
Block a user