Skip to content

Commit

Permalink
monitor: const annotate misc arrays
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 7ef5477 commit 4630f3f
Show file tree
Hide file tree
Showing 6 changed files with 10 additions and 10 deletions.
8 changes: 4 additions & 4 deletions monitor/att.c
Original file line number Diff line number Diff line change
Expand Up @@ -2583,7 +2583,7 @@ static void media_state_notify(const struct l2cap_frame *frame)
print_media_state(frame);
}

struct media_cp_opcode {
static const struct media_cp_opcode {
uint8_t opcode;
const char *opcode_str;
} media_cp_opcode_table[] = {
Expand Down Expand Up @@ -2741,7 +2741,7 @@ static void content_control_id_read(const struct l2cap_frame *frame)

static const struct pa_sync_state_decoder {
uint8_t code;
char *value;
const char *value;
} pa_sync_state_decoders[] = {
{ 0x00, "Not synchronized to PA" },
{ 0x01, "SyncInfo Request" },
Expand All @@ -2752,7 +2752,7 @@ static const struct pa_sync_state_decoder {

static const struct cp_pa_sync_state_decoder {
uint8_t code;
char *value;
const char *value;
} cp_pa_sync_state_decoders[] = {
{ 0x00, "Do not synchronize to PA" },
{ 0x01, "Synchronize to PA - PAST available" },
Expand All @@ -2761,7 +2761,7 @@ static const struct cp_pa_sync_state_decoder {

static const struct big_enc_decoder {
uint8_t code;
char *value;
const char *value;
} big_enc_decoders[] = {
{ 0x00, "Not encrypted" },
{ 0x01, "Broadcast_Code required" },
Expand Down
2 changes: 1 addition & 1 deletion monitor/avctp.c
Original file line number Diff line number Diff line change
Expand Up @@ -1802,7 +1802,7 @@ static bool avrcp_change_path(struct avctp_frame *avctp_frame)
}


static struct {
static const struct {
const char *str;
bool reserved;
} features_table[] = {
Expand Down
2 changes: 1 addition & 1 deletion monitor/intel.c
Original file line number Diff line number Diff line change
Expand Up @@ -1798,7 +1798,7 @@ static const struct vendor_evt vendor_prefix_evt_table[] = {
{ }
};

const uint8_t intel_vendor_prefix[] = {0x87, 0x80};
static const uint8_t intel_vendor_prefix[] = {0x87, 0x80};
#define INTEL_VENDOR_PREFIX_SIZE sizeof(intel_vendor_prefix)

/*
Expand Down
2 changes: 1 addition & 1 deletion monitor/l2cap.c
Original file line number Diff line number Diff line change
Expand Up @@ -718,7 +718,7 @@ static void print_config_result(uint16_t result)
print_field("Result: %s (0x%4.4x)", str, le16_to_cpu(result));
}

static struct {
static const struct {
uint8_t type;
uint8_t len;
const char *str;
Expand Down
2 changes: 1 addition & 1 deletion monitor/rfcomm.c
Original file line number Diff line number Diff line change
Expand Up @@ -32,7 +32,7 @@
#include "sdp.h"
#include "rfcomm.h"

static char *cr_str[] = {
static const char *cr_str[] = {
"RSP",
"CMD"
};
Expand Down
4 changes: 2 additions & 2 deletions monitor/sdp.c
Original file line number Diff line number Diff line change
Expand Up @@ -167,7 +167,7 @@ static struct {
{ }
};

static struct {
static const struct {
uint8_t index;
uint8_t bits;
uint8_t size;
Expand Down Expand Up @@ -322,7 +322,7 @@ static uint32_t get_bytes(const uint8_t *data, uint32_t size)
return 0;
}

static struct {
static const struct {
uint16_t id;
const char *str;
} attribute_table[] = {
Expand Down

0 comments on commit 4630f3f

Please sign in to comment.