iwd: remove unnecessary semicolons

Found with clang's -Wextra-semi-stmt
This commit is contained in:
Rosen Penev 2020-04-09 17:38:29 -07:00 committed by Denis Kenzior
parent 5d68fbd55f
commit a47609acbe
10 changed files with 34 additions and 26 deletions

View File

@ -199,7 +199,7 @@ do { \
print_indent(4 + (level) * 4, COLOR_OFF, "", "", color, \
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,
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) \
if (caps & (v)) { \
print_attr(level + 1, "%s", (str)); \
caps &= ~(v); \
}
do { \
if (caps & (v)) { \
print_attr(level + 1, "%s", (str)); \
caps &= ~(v); \
} \
} while(0)
static void print_p2p_device_capability(unsigned int level, const char *label,
const void *data, uint16_t size)
{
@ -3178,11 +3181,13 @@ static void print_p2p_manageability(unsigned int level, const char *label,
return;
}
#define CHECK_BIT(v, str) \
if (val & (v)) { \
print_attr(level + 1, "%s", (str)); \
val &= ~(v); \
}
#define CHECK_BIT(v, str) \
do { \
if (val & (v)) { \
print_attr(level + 1, "%s", (str)); \
val &= ~(v); \
} \
} while(0)
val = *(const uint8_t *) data;
@ -5239,7 +5244,7 @@ static void print_eap(unsigned int level, const void *data, uint32_t size)
default:
str = "Reserved";
break;
};
}
print_attr(level, "Code: %u (%s)", eap[0], str);
print_attr(level, "Identifier: %u", eap[1]);

View File

@ -469,7 +469,7 @@ int crypto_cipher_key_len(enum crypto_cipher cipher)
return 16;
case CRYPTO_CIPHER_BIP:
return 16;
};
}
return 0;
}

View File

@ -279,7 +279,7 @@ uint8_t *eapol_decrypt_key_data(enum ie_rsn_akm_suite akm, const uint8_t *kek,
break;
default:
return NULL;
};
}
buf = l_new(uint8_t, expected_len);
@ -1674,7 +1674,7 @@ static void eapol_handle_ptk_3_of_4(struct eapol_sm *sm,
return;
}
igtk_key_index = l_get_le16(igtk);;
igtk_key_index = l_get_le16(igtk);
igtk += 2;
igtk_len -= 2;
} else
@ -1834,7 +1834,7 @@ static void eapol_handle_gtk_1_of_2(struct eapol_sm *sm,
if (!igtk)
return;
igtk_key_index = l_get_le16(igtk);;
igtk_key_index = l_get_le16(igtk);
igtk += 2;
igtk_len -= 2;
} else

View File

@ -308,7 +308,7 @@ static bool erp_derive_reauth_keys(const uint8_t *emsk, size_t emsk_len,
void *r_rk, void *r_ik)
{
char info[256];
char *ptr;;
char *ptr;
ptr = info + l_strlcpy(info, ERP_RRK_LABEL, sizeof(info)) + 1;

View File

@ -1,3 +1,4 @@
/*
*
* Wireless daemon for Linux
@ -508,7 +509,7 @@ static int fils_rx_associate(struct auth_proto *driver, const uint8_t *frame,
if (!igtk)
goto invalid_ies;
igtk_key_index = l_get_le16(igtk);;
igtk_key_index = l_get_le16(igtk);
igtk += 2;
igtk_len -= 2;

View File

@ -915,10 +915,12 @@ static bool ie_build_cipher_suite(uint8_t *data, const uint8_t *oui,
return false;
}
#define RETURN_AKM(data, oui, id) \
memcpy((data), (oui), 3); \
(data)[3] = (id); \
return true;
#define RETURN_AKM(data, oui, id) \
do { \
memcpy((data), (oui), 3); \
(data)[3] = (id); \
return true; \
} while(0)
/* 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)

View File

@ -339,7 +339,7 @@ static int check_crypto()
l_hashmap_insert(options, "CONFIG_PKCS7_MESSAGE_PARSER", &r);
l_hashmap_insert(options,
"CONFIG_PKCS8_PRIVATE_KEY_PARSER", &r);
};
}
if (l_hashmap_isempty(options))
goto done;

View File

@ -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_len = l_ecc_point_get_data(element1, e1, sizeof(e1));
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_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);

View File

@ -2174,7 +2174,7 @@ static void station_netdev_event(struct netdev *netdev, enum netdev_event event,
case NETDEV_EVENT_RSSI_LEVEL_NOTIFY:
station_rssi_level_changed(station, l_get_u8(event_data));
break;
};
}
}
static bool station_try_next_bss(struct station *station)

View File

@ -262,7 +262,7 @@ static void wsc_enrollee_netdev_event(struct netdev *netdev,
default:
l_debug("Unexpected event: %d", event);
break;
};
}
}
static void wsc_enrollee_handshake_event(struct handshake_state *hs,