treewide: Various style fixups
- Mostly problems with whitespace: - Use of spaces instead of tabs - Stray spaces before closing ') - Missing spaces - Missing 'void' from function declarations & definitions that take no arguments. - Wrong indentation level
This commit is contained in:
parent
967c95829f
commit
fe95cbe077
|
@ -162,7 +162,7 @@ static void signal_handler(int signo)
|
|||
exit(EXIT_FAILURE);
|
||||
}
|
||||
|
||||
void __iwd_backtrace_init()
|
||||
void __iwd_backtrace_init(void)
|
||||
{
|
||||
static char path[PATH_MAX];
|
||||
static char cwd[PATH_MAX];
|
||||
|
@ -174,6 +174,7 @@ void __iwd_backtrace_init()
|
|||
len = readlink("/proc/self/exe", path, sizeof(path) - 1);
|
||||
if (len > 0) {
|
||||
int i;
|
||||
|
||||
path[len] = '\0';
|
||||
|
||||
for (i = len - 1; i >= 0; i--) {
|
||||
|
|
|
@ -20,6 +20,6 @@
|
|||
*
|
||||
*/
|
||||
#ifdef HAVE_BACKTRACE
|
||||
void __iwd_backtrace_init();
|
||||
void __iwd_backtrace_init(void);
|
||||
void __iwd_backtrace_print(unsigned int offset);
|
||||
#endif
|
||||
|
|
|
@ -73,7 +73,8 @@ size_t crypto_dh5_generator_size = sizeof(crypto_dh5_generator);
|
|||
|
||||
static bool hmac_common(enum l_checksum_type type,
|
||||
const void *key, size_t key_len,
|
||||
const void *data, size_t data_len, void *output, size_t size)
|
||||
const void *data, size_t data_len,
|
||||
void *output, size_t size)
|
||||
{
|
||||
struct l_checksum *hmac;
|
||||
|
||||
|
@ -440,7 +441,7 @@ free_ctr:
|
|||
|
||||
#define SWAP(a, b) do { int _t = a; a = b; b = _t; } while (0)
|
||||
|
||||
static void arc4_set_key(struct arc4_ctx *ctx, unsigned length,
|
||||
static void arc4_set_key(struct arc4_ctx *ctx, unsigned int length,
|
||||
const uint8_t *key)
|
||||
{
|
||||
unsigned int i, j, k;
|
||||
|
@ -458,8 +459,8 @@ static void arc4_set_key(struct arc4_ctx *ctx, unsigned length,
|
|||
ctx->i = ctx->j = 0;
|
||||
}
|
||||
|
||||
static void arc4_crypt(struct arc4_ctx *ctx, unsigned length, uint8_t *dst,
|
||||
const uint8_t *src)
|
||||
static void arc4_crypt(struct arc4_ctx *ctx, unsigned int length,
|
||||
uint8_t *dst, const uint8_t *src)
|
||||
{
|
||||
uint8_t i, j;
|
||||
|
||||
|
|
|
@ -475,8 +475,8 @@ static bool eap_peap_tunnel_ready(struct eap_state *eap,
|
|||
/*
|
||||
* PEAPv1: draft-josefsson-pppext-eap-tls-eap-05, Section 2.1.1
|
||||
*
|
||||
* Cleartext Success/Failure packets MUST be silently discarded once TLS
|
||||
* tunnel has been brought up.
|
||||
* Cleartext Success/Failure packets MUST be silently discarded once
|
||||
* TLS tunnel has been brought up.
|
||||
*/
|
||||
eap_discard_success_and_failure(eap, true);
|
||||
|
||||
|
|
|
@ -726,10 +726,10 @@ static bool frame_watch_remove_by_handler(uint64_t wdev_id, uint32_t group_id,
|
|||
frame_watch_cb_t handler,
|
||||
void *user_data)
|
||||
{
|
||||
struct watch_group_match_info group_info =
|
||||
{ group_id == 0 ? 0 : wdev_id, group_id };
|
||||
struct frame_watch_handler_check_info handler_info =
|
||||
{ wdev_id, handler, user_data };
|
||||
struct watch_group_match_info group_info = {
|
||||
group_id == 0 ? 0 : wdev_id, group_id };
|
||||
struct frame_watch_handler_check_info handler_info = {
|
||||
wdev_id, handler, user_data };
|
||||
struct watch_group *group = l_queue_find(watch_groups,
|
||||
frame_watch_group_match,
|
||||
&group_info);
|
||||
|
|
3
src/ft.c
3
src/ft.c
|
@ -640,7 +640,8 @@ static int ft_rx_authenticate(struct auth_proto *ap, const uint8_t *frame,
|
|||
* FT Protocol.
|
||||
*/
|
||||
if (!ft_parse_authentication_resp_frame(frame, frame_len, ft->hs->spa,
|
||||
ft->hs->aa, ft->hs->aa, 2, &status_code,
|
||||
ft->hs->aa, ft->hs->aa,
|
||||
2, &status_code,
|
||||
&ies, &ies_len))
|
||||
goto auth_error;
|
||||
|
||||
|
|
|
@ -44,7 +44,7 @@
|
|||
#include "src/erp.h"
|
||||
#include "src/band.h"
|
||||
|
||||
static inline unsigned int n_ecc_groups()
|
||||
static inline unsigned int n_ecc_groups(void)
|
||||
{
|
||||
const unsigned int *groups = l_ecc_supported_ike_groups();
|
||||
unsigned int j = 0;
|
||||
|
|
|
@ -302,7 +302,7 @@ bool json_iter_get_int(struct json_iter *iter, int *i)
|
|||
{
|
||||
void *ptr;
|
||||
size_t len;
|
||||
long int r;
|
||||
long r;
|
||||
int t;
|
||||
char *endp;
|
||||
|
||||
|
@ -328,7 +328,7 @@ bool json_iter_get_uint(struct json_iter *iter, unsigned int *i)
|
|||
{
|
||||
void *ptr;
|
||||
size_t len;
|
||||
unsigned long int r;
|
||||
unsigned long r;
|
||||
unsigned int t;
|
||||
char *endp;
|
||||
|
||||
|
|
|
@ -265,7 +265,7 @@ static void print_koption(const void *key, void *value, void *user_data)
|
|||
#define ADD_OPTIONAL(opt) \
|
||||
l_hashmap_replace(optional, opt, &r, NULL)
|
||||
|
||||
static int check_crypto()
|
||||
static int check_crypto(void)
|
||||
{
|
||||
int r = 0;
|
||||
struct l_hashmap *options = l_hashmap_string_new();
|
||||
|
|
|
@ -196,7 +196,7 @@ static void manager_create_interfaces(struct wiphy_setup_state *state)
|
|||
struct l_genl_msg *msg;
|
||||
char ifname[10];
|
||||
uint32_t iftype;
|
||||
unsigned cmd_id;
|
||||
unsigned int cmd_id;
|
||||
|
||||
if (state->aborted)
|
||||
return;
|
||||
|
@ -341,7 +341,7 @@ static void manager_get_interface_cb(struct l_genl_msg *msg, void *user_data)
|
|||
uint64_t wdev;
|
||||
const char *ifname;
|
||||
struct l_genl_msg *del_msg;
|
||||
unsigned cmd_id;
|
||||
unsigned int cmd_id;
|
||||
char *pattern;
|
||||
unsigned int i;
|
||||
bool whitelisted = false, blacklisted = false;
|
||||
|
@ -703,7 +703,7 @@ static void manager_config_notify(struct l_genl_msg *msg, void *user_data)
|
|||
case NL80211_CMD_NEW_INTERFACE:
|
||||
/*
|
||||
* Interfaces are normally dumped on the NEW_WIPHY events and
|
||||
* and we have nothing to do here. But check if by any chance
|
||||
* we have nothing to do here. But check if by any chance
|
||||
* we've queried this wiphy and it was still busy initialising,
|
||||
* in that case retry the setup now that an interface, likely
|
||||
* the initial default one, has been added.
|
||||
|
|
|
@ -364,6 +364,7 @@ static bool validate_mgmt_ies(const uint8_t *ies, size_t ies_len,
|
|||
|
||||
while (ie_tlv_iter_next(&iter)) {
|
||||
int i = 0;
|
||||
|
||||
tag = ie_tlv_iter_get_tag(&iter);
|
||||
|
||||
/* Check that the tag is part of the valid set */
|
||||
|
|
|
@ -2912,7 +2912,6 @@ process_resp_ies:
|
|||
HANDSHAKE_EVENT_SETTING_KEYS);
|
||||
|
||||
netdev_connect_ok(netdev);
|
||||
|
||||
return;
|
||||
|
||||
error:
|
||||
|
|
|
@ -562,6 +562,7 @@ static int scan_request_send_trigger(struct scan_context *sc,
|
|||
struct scan_request *sr)
|
||||
{
|
||||
struct l_genl_msg *cmd = l_queue_peek_head(sr->cmds);
|
||||
|
||||
if (!cmd)
|
||||
return -ENOMSG;
|
||||
|
||||
|
@ -2087,7 +2088,7 @@ static int scan_init(void)
|
|||
return 0;
|
||||
}
|
||||
|
||||
static void scan_exit()
|
||||
static void scan_exit(void)
|
||||
{
|
||||
l_queue_destroy(scan_contexts,
|
||||
(l_queue_destroy_func_t) scan_context_free);
|
||||
|
|
|
@ -1105,7 +1105,7 @@ build_ie:
|
|||
* any offload features are detected (since IWD prefers to use offload).
|
||||
*/
|
||||
info.ocvc = !disable_ocv && bss_info.ocvc && info.mfpc &&
|
||||
!wiphy_can_offload(wiphy);;
|
||||
!wiphy_can_offload(wiphy);
|
||||
|
||||
/*
|
||||
* IEEE 802.11-2020 9.4.2.24.4 states extended key IDs can only be used
|
||||
|
@ -1887,8 +1887,8 @@ static void station_ft_ds_action_start(struct station *station)
|
|||
continue;
|
||||
|
||||
/*
|
||||
* Fire and forget. Netdev will maintain a cache of responses and
|
||||
* when the time comes these can be referenced for a roam
|
||||
* Fire and forget. Netdev will maintain a cache of responses
|
||||
* and when the time comes these can be referenced for a roam
|
||||
*/
|
||||
netdev_fast_transition_over_ds_action(station->netdev, bss);
|
||||
}
|
||||
|
|
|
@ -918,6 +918,7 @@ static void wiphy_print_band_info(struct band *band, const char *name)
|
|||
|
||||
if (band->ht_supported) {
|
||||
uint8_t max_nss = bit_field(band->ht_mcs_set[12], 2, 2) + 1;
|
||||
|
||||
l_info("\t\tHT Capabilities:");
|
||||
|
||||
if (test_bit(band->ht_capabilities, 1))
|
||||
|
|
|
@ -1751,6 +1751,7 @@ static uint8_t *wsc_attr_builder_free(struct wsc_attr_builder *builder,
|
|||
|
||||
if (builder->curlen > 0) {
|
||||
uint8_t *bytes = builder->buf + builder->offset;
|
||||
|
||||
l_put_be16(builder->curlen - 4, bytes + 2);
|
||||
builder->offset += builder->curlen;
|
||||
builder->curlen = 0;
|
||||
|
|
Loading…
Reference in New Issue