mirror of https://github.com/nirenjan/libx52.git
Do not print NULL module names
Prior to this change, if a module had not registered a name, then the output would display `(null): `, which was not really helpful. This change eliminates that by checking if the module name is not NULL prior to calling the print routines.reverse-scroll
parent
417641dee0
commit
f4a8e7c4d5
|
@ -347,7 +347,7 @@ void pinelog_log_message(int module, int level, const char *file, int line, cons
|
|||
#endif
|
||||
|
||||
/* Set the module name if it is not the root */
|
||||
if (module != PINELOG_MODULE_GLOBAL) {
|
||||
if (module != PINELOG_MODULE_GLOBAL && module_name[module] != NULL) {
|
||||
#if PINELOG_BUFFER_SZ
|
||||
buf_pos += snprintf(output_buffer + buf_pos, sizeof(output_buffer) - buf_pos,
|
||||
"%s: ", module_name[module]);
|
||||
|
|
Loading…
Reference in New Issue