Skip to content

Commit 23323af

Browse files
mah-eiSmartgmarull
authored andcommitted
[nrf fromtree] Bluetooth: bugfix in applying appearance from settings
The len parameter is the settings name length 'appearance' Signed-off-by: Matthias Hauser <[email protected]> (cherry picked from commit c0e3971) Signed-off-by: Herman Berget <[email protected]>
1 parent bdb4e00 commit 23323af

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

subsys/bluetooth/host/settings.c

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -186,7 +186,7 @@ static int set(const char *name, size_t len_rd, settings_read_cb read_cb,
186186

187187
#if defined(CONFIG_BT_DEVICE_APPEARANCE_DYNAMIC)
188188
if (!strncmp(name, "appearance", len)) {
189-
if (len != sizeof(bt_dev.appearance)) {
189+
if (len_rd != sizeof(bt_dev.appearance)) {
190190
BT_ERR("Ignoring settings entry 'bt/appearance'. Wrong length.");
191191
return -EINVAL;
192192
}

0 commit comments

Comments
 (0)