log: add a null check and fix indentation
This commit is contained in:
parent
78a4d60584
commit
3a1cfc6f3e
@ -171,6 +171,9 @@ int
|
||||
log_get_level(const char *module)
|
||||
{
|
||||
int i = 0;
|
||||
if(module == NULL) {
|
||||
return -1;
|
||||
}
|
||||
while(all_modules[i].name != NULL) {
|
||||
if(!strcmp(module, all_modules[i].name)) {
|
||||
return *all_modules[i].curr_log_level;
|
||||
|
Loading…
Reference in New Issue
Block a user