Skip to content

Commit ab7749a

Browse files
theob-prom-alperen-sener
authored andcommitted
[nrf fromtree] Bluetooth: Host: Specify parameter needs of bt_set_name
State that the name given to `bt_set_name` must be null terminated. If not, the behavior of the function may be wrong as it's using `strlen` to get the length of the given name and `strcmp` to compare it to the current device name. Both of those functions expect null terminated string. Signed-off-by: Théo Battrel <[email protected]> (cherry picked from commit 7884b92)
1 parent 4eb4e81 commit ab7749a

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

include/zephyr/bluetooth/bluetooth.h

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -268,7 +268,7 @@ bool bt_is_ready(void);
268268
*
269269
* @sa @kconfig{CONFIG_BT_DEVICE_NAME_MAX}.
270270
*
271-
* @param name New name
271+
* @param name New name, must be null terminated
272272
*
273273
* @return Zero on success or (negative) error code otherwise.
274274
*/

0 commit comments

Comments
 (0)