drivers/syslog: Avoid prepending process name when no TCB is available
Signed-off-by: Gustavo Henrique Nihei <gustavo.nihei@espressif.com>
This commit is contained in:
parent
48ab08c43d
commit
d12619c85f
|
@ -206,7 +206,8 @@ int nx_vsyslog(int priority, FAR const IPTR char *fmt, FAR va_list *ap)
|
|||
/* Prepend the process name */
|
||||
|
||||
tcb = nxsched_get_tcb(getpid());
|
||||
ret += lib_sprintf(&stream.public, "%s: ", tcb->name);
|
||||
ret += lib_sprintf(&stream.public, "%s: ",
|
||||
(tcb != NULL) ? tcb->name : "(null)");
|
||||
#endif
|
||||
|
||||
/* Generate the output */
|
||||
|
|
Loading…
Reference in New Issue