diff --git a/subsys/mgmt/mcumgr/lib/cmd/os_mgmt/src/os_mgmt.c b/subsys/mgmt/mcumgr/lib/cmd/os_mgmt/src/os_mgmt.c index 7b9860bcf99..d66e4235a4b 100644 --- a/subsys/mgmt/mcumgr/lib/cmd/os_mgmt/src/os_mgmt.c +++ b/subsys/mgmt/mcumgr/lib/cmd/os_mgmt/src/os_mgmt.c @@ -10,9 +10,9 @@ #include #include #include +#include #include #include -#include #include #include #include @@ -109,7 +109,7 @@ os_mgmt_taskstat_encode_thread_name(zcbor_state_t *zse, int idx, #error Unsupported option for taskstat thread name #endif - ll_to_s(idx, sizeof(thread_name) - 1, thread_name); + snprintf(thread_name, sizeof(thread_name) - 1, "%d", idx); thread_name[sizeof(thread_name) - 1] = 0; return zcbor_tstr_put_term(zse, thread_name);