Bluetooth: Host: Add const prefix for UUID

Add const prefix for service uuid and char uuid.

Since Service UUID and Char UUID should not change in the service
definition, they are most reasonably defined as rodata, also for
save some ram footprint.

The field `attr->user_data` type is `void *`, as this PR change
all Service UUID to rodata, so there must add (void *) to avoid warning.

Signed-off-by: Lingao Meng <menglingao@xiaomi.com>
This commit is contained in:
Lingao Meng 2023-12-05 17:52:21 +08:00 committed by Fabio Baltieri
commit 786b9a0ad4
35 changed files with 81 additions and 79 deletions

View file

@ -174,7 +174,7 @@ static bool eir_found(struct bt_data *data, void *user_data)
}
for (i = 0; i < data->data_len; i += sizeof(uint16_t)) {
struct bt_uuid *uuid;
const struct bt_uuid *uuid;
uint16_t u16;
int err;