mirror of https://github.com/nirenjan/pinelog.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.master
							parent
							
								
									3be94a24ba
								
							
						
					
					
						commit
						c1d9cb0875
					
				|  | @ -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