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:
parent
a51af14729
commit
786b9a0ad4
35 changed files with 81 additions and 79 deletions
|
@ -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;
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue