3
0
mirror of https://git.kernel.org/pub/scm/network/wireless/iwd.git synced 2024-12-22 13:02:44 +01:00

treewide: Add () around certain macros

This commit is contained in:
Denis Kenzior 2022-01-11 10:56:39 -06:00
parent cba19d3bf5
commit b44460464e
4 changed files with 5 additions and 5 deletions

View File

@ -598,8 +598,8 @@ static void eap_pwd_send_ack(struct eap_state *eap)
}
#define FRAG_BYTES(mtu, remaining) \
((mtu - EAP_PWD_HDR_LEN) < remaining) ? (mtu - EAP_PWD_HDR_LEN) : \
remaining
(((mtu - EAP_PWD_HDR_LEN) < remaining) ? (mtu - EAP_PWD_HDR_LEN) : \
remaining)
static void eap_pwd_handle_request(struct eap_state *eap,
const uint8_t *pkt, size_t len)

View File

@ -70,7 +70,7 @@ struct eapol_frame {
#define EAPOL_KEY_DATA(ek, mic_len) ((ek)->key_data + (mic_len) + 2)
/* gets frame length (not including key data) */
#define EAPOL_FRAME_LEN(mic_len) sizeof(struct eapol_key) + (mic_len) + 2
#define EAPOL_FRAME_LEN(mic_len) (sizeof(struct eapol_key) + (mic_len) + 2)
struct eapol_key {
struct eapol_header header;

View File

@ -355,7 +355,7 @@ enum ie_rsn_akm_suite {
(akm == IE_RSN_AKM_SUITE_FT_OVER_FILS_SHA384))
#define IE_LEN(ie) \
(ie) ? (ie)[1] + 2 : 0
((ie) ? (ie)[1] + 2 : 0)
struct ie_tlv_iter {
unsigned int max;

View File

@ -35,7 +35,7 @@
/* Max number of tokens supported. Increase if larger objects are expected */
#define JSON_DEFAULT_TOKENS 60
#define TOK_LEN(token) (token)->end - (token)->start
#define TOK_LEN(token) ((token)->end - (token)->start)
#define TOK_PTR(json, token) (void *)((json) + (token)->start)
#define TOK_TO_STR(json, token) \
({ \