Skip to content

Commit

Permalink
client: annotate struct option instances as const
Browse files Browse the repository at this point in the history
  • Loading branch information
evelikov-work authored and Vudentz committed Jan 19, 2024
1 parent a8543fd commit 20864af
Showing 1 changed file with 20 additions and 20 deletions.
40 changes: 20 additions & 20 deletions client/mgmt.c
Original file line number Diff line number Diff line change
Expand Up @@ -2203,7 +2203,7 @@ static void get_flags_rsp(uint8_t status, uint16_t len, const void *param,
bt_shell_noninteractive_quit(EXIT_SUCCESS);
}

static struct option get_flags_options[] = {
static const struct option get_flags_options[] = {
{ "help", 0, 0, 'h' },
{ "type", 1, 0, 't' },
{ 0, 0, 0, 0 }
Expand Down Expand Up @@ -2272,7 +2272,7 @@ static void set_flags_rsp(uint8_t status, uint16_t len, const void *param,
bt_shell_noninteractive_quit(EXIT_SUCCESS);
}

static struct option set_flags_options[] = {
static const struct option set_flags_options[] = {
{ "help", 0, 0, 'h' },
{ "type", 1, 0, 't' },
{ "flags", 1, 0, 'f' },
Expand Down Expand Up @@ -2678,7 +2678,7 @@ static void disconnect_rsp(uint8_t status, uint16_t len, const void *param,
bt_shell_noninteractive_quit(EXIT_SUCCESS);
}

static struct option disconnect_options[] = {
static const struct option disconnect_options[] = {
{ "help", 0, 0, 'h' },
{ "type", 1, 0, 't' },
{ 0, 0, 0, 0 }
Expand Down Expand Up @@ -2783,7 +2783,7 @@ static void find_service_rsp(uint8_t status, uint16_t len, const void *param,
discovery = true;
}

static struct option find_service_options[] = {
static const struct option find_service_options[] = {
{ "help", no_argument, 0, 'h' },
{ "le-only", no_argument, 0, 'l' },
{ "bredr-only", no_argument, 0, 'b' },
Expand Down Expand Up @@ -2880,7 +2880,7 @@ static void find_rsp(uint8_t status, uint16_t len, const void *param,
discovery = true;
}

static struct option find_options[] = {
static const struct option find_options[] = {
{ "help", 0, 0, 'h' },
{ "le-only", 1, 0, 'l' },
{ "bredr-only", 1, 0, 'b' },
Expand Down Expand Up @@ -2952,7 +2952,7 @@ static void stop_find_rsp(uint8_t status, uint16_t len, const void *param,
bt_shell_noninteractive_quit(EXIT_SUCCESS);
}

static struct option stop_find_options[] = {
static const struct option stop_find_options[] = {
{ "help", 0, 0, 'h' },
{ "le-only", 1, 0, 'l' },
{ "bredr-only", 1, 0, 'b' },
Expand Down Expand Up @@ -3074,7 +3074,7 @@ static void register_pair_callbacks(struct mgmt *mgmt, uint16_t index)
passkey_notify, mgmt, NULL);
}

static struct option pair_options[] = {
static const struct option pair_options[] = {
{ "help", 0, 0, 'h' },
{ "capability", 1, 0, 'c' },
{ "type", 1, 0, 't' },
Expand Down Expand Up @@ -3169,7 +3169,7 @@ static void cancel_pair_rsp(uint8_t status, uint16_t len, const void *param,
bt_shell_noninteractive_quit(EXIT_SUCCESS);
}

static struct option cancel_pair_options[] = {
static const struct option cancel_pair_options[] = {
{ "help", 0, 0, 'h' },
{ "type", 1, 0, 't' },
{ 0, 0, 0, 0 }
Expand Down Expand Up @@ -3251,7 +3251,7 @@ static void unpair_rsp(uint8_t status, uint16_t len, const void *param,
bt_shell_noninteractive_quit(EXIT_SUCCESS);
}

static struct option unpair_options[] = {
static const struct option unpair_options[] = {
{ "help", 0, 0, 'h' },
{ "type", 1, 0, 't' },
{ 0, 0, 0, 0 }
Expand Down Expand Up @@ -3378,7 +3378,7 @@ static void irks_rsp(uint8_t status, uint16_t len, const void *param,
bt_shell_noninteractive_quit(EXIT_SUCCESS);
}

static struct option irks_options[] = {
static const struct option irks_options[] = {
{ "help", 0, 0, 'h' },
{ "local", 1, 0, 'l' },
{ "file", 1, 0, 'f' },
Expand Down Expand Up @@ -3492,7 +3492,7 @@ static void block_rsp(uint16_t op, uint16_t id, uint8_t status, uint16_t len,
bt_shell_noninteractive_quit(EXIT_SUCCESS);
}

static struct option block_options[] = {
static const struct option block_options[] = {
{ "help", 0, 0, 'h' },
{ "type", 1, 0, 't' },
{ 0, 0, 0, 0 }
Expand Down Expand Up @@ -3736,7 +3736,7 @@ static void remote_oob_rsp(uint8_t status, uint16_t len, const void *param,
print("Remote OOB data added for %s (%u)", addr, rp->type);
}

static struct option remote_oob_opt[] = {
static const struct option remote_oob_opt[] = {
{ "help", 0, 0, '?' },
{ "type", 1, 0, 't' },
{ 0, 0, 0, 0 }
Expand Down Expand Up @@ -3979,7 +3979,7 @@ static void conn_info_rsp(uint8_t status, uint16_t len, const void *param,
bt_shell_noninteractive_quit(EXIT_SUCCESS);
}

static struct option conn_info_options[] = {
static const struct option conn_info_options[] = {
{ "help", 0, 0, 'h' },
{ "type", 1, 0, 't' },
{ 0, 0, 0, 0 }
Expand Down Expand Up @@ -4150,7 +4150,7 @@ static void add_device_rsp(uint8_t status, uint16_t len, const void *param,
bt_shell_noninteractive_quit(EXIT_SUCCESS);
}

static struct option add_device_options[] = {
static const struct option add_device_options[] = {
{ "help", 0, 0, 'h' },
{ "action", 1, 0, 'a' },
{ "type", 1, 0, 't' },
Expand Down Expand Up @@ -4223,7 +4223,7 @@ static void remove_device_rsp(uint8_t status, uint16_t len, const void *param,
bt_shell_noninteractive_quit(EXIT_SUCCESS);
}

static struct option del_device_options[] = {
static const struct option del_device_options[] = {
{ "help", 0, 0, 'h' },
{ "type", 1, 0, 't' },
{ 0, 0, 0, 0 }
Expand Down Expand Up @@ -4477,7 +4477,7 @@ static void advsize_usage(void)
"\t -n, --local-name \"local-name\" flag");
}

static struct option advsize_options[] = {
static const struct option advsize_options[] = {
{ "help", 0, 0, 'h' },
{ "connectable", 0, 0, 'c' },
{ "general-discov", 0, 0, 'g' },
Expand Down Expand Up @@ -4597,7 +4597,7 @@ static void add_adv_usage(void)
"\tadd-adv -u 180d -u 180f -d 080954657374204C45 1");
}

static struct option add_adv_options[] = {
static const struct option add_adv_options[] = {
{ "help", 0, 0, 'h' },
{ "uuid", 1, 0, 'u' },
{ "adv-data", 1, 0, 'd' },
Expand Down Expand Up @@ -4935,7 +4935,7 @@ static void add_ext_adv_params_usage(void)
"\tadd-ext-adv-params -r 0x801 -x 0x802 -P 2M -g 1");
}

static struct option add_ext_adv_params_options[] = {
static const struct option add_ext_adv_params_options[] = {
{ "help", 0, 0, 'h' },
{ "duration", 1, 0, 'd' },
{ "timeout", 1, 0, 't' },
Expand Down Expand Up @@ -5113,7 +5113,7 @@ static void add_ext_adv_data_usage(void)
"\tadd-ext-adv-data -u 180d -u 180f -d 080954657374204C45 1");
}

static struct option add_ext_adv_data_options[] = {
static const struct option add_ext_adv_data_options[] = {
{ "help", 0, 0, 'h' },
{ "uuid", 1, 0, 'u' },
{ "adv-data", 1, 0, 'd' },
Expand Down Expand Up @@ -5557,7 +5557,7 @@ static bool str2pattern(struct mgmt_adv_pattern *pattern, const char *str)
return true;
}

static struct option add_monitor_rssi_options[] = {
static const struct option add_monitor_rssi_options[] = {
{ "help", 0, 0, 'h' },
{ "high-threshold", 1, 0, 'R' },
{ "low-threshold", 1, 0, 'r' },
Expand Down

0 comments on commit 20864af

Please sign in to comment.