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:
parent
cba19d3bf5
commit
b44460464e
@ -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)
|
||||
|
@ -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;
|
||||
|
2
src/ie.h
2
src/ie.h
@ -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;
|
||||
|
@ -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) \
|
||||
({ \
|
||||
|
Loading…
Reference in New Issue
Block a user