net: log_strdup() was missing when printing thread name
If CONFIG_THREAD_NAME is enabled, we must use log_strdup() when printing the thread name. Signed-off-by: Jukka Rissanen <jukka.rissanen@linux.intel.com>
This commit is contained in:
parent
8ac2f96ca6
commit
5f3d999bb9
|
@ -45,8 +45,8 @@ extern "C" {
|
||||||
/* Network subsystem logging helpers */
|
/* Network subsystem logging helpers */
|
||||||
#ifdef CONFIG_THREAD_NAME
|
#ifdef CONFIG_THREAD_NAME
|
||||||
#define NET_DBG(fmt, ...) LOG_DBG("(%s): " fmt, \
|
#define NET_DBG(fmt, ...) LOG_DBG("(%s): " fmt, \
|
||||||
k_thread_name_get(k_current_get()), \
|
log_strdup(k_thread_name_get(k_current_get())), \
|
||||||
##__VA_ARGS__)
|
##__VA_ARGS__)
|
||||||
#else
|
#else
|
||||||
#define NET_DBG(fmt, ...) LOG_DBG("(%p): " fmt, k_current_get(), \
|
#define NET_DBG(fmt, ...) LOG_DBG("(%p): " fmt, k_current_get(), \
|
||||||
##__VA_ARGS__)
|
##__VA_ARGS__)
|
||||||
|
|
Loading…
Reference in a new issue