This commit is contained in:
jeka committed 2026-03-06 01:36:57 +03:00
1 parent b2640e7201
commit 15c7968c8c
34 files changed
+332 -284

No files matched your search

+6 -5
View File
@@ -4,6 +4,7 @@
#include "debug_config.h"
#include "platform_compat.h"
#include "mem.h"
#include <stdlib.h>
#include <string.h>
#include <errno.h>
@@ -349,7 +350,7 @@ int debug_parse_config(const char* config_string) {
char* eq = strchr(token, '=');
if (!eq) {
free(str);
u_free(str);
return -1;
}
@@ -372,7 +373,7 @@ int debug_parse_config(const char* config_string) {
debug_category_t cat = get_category_by_name(mod_token);
if (cat == DEBUG_CATEGORY_NONE) {
free(str);
u_free(str);
return -1;
}
categories |= cat;
@@ -381,12 +382,12 @@ int debug_parse_config(const char* config_string) {
} else if (strcasecmp(key, "level") == 0) {
int lev_num = atoi(value);
if (lev_num < DEBUG_LEVEL_NONE || lev_num > DEBUG_LEVEL_TRACE) {
free(str);
u_free(str);
return -1;
}
level = (debug_level_t)lev_num;
} else {
free(str);
u_free(str);
return -1;
}
@@ -395,6 +396,6 @@ int debug_parse_config(const char* config_string) {
debug_set_masks(categories, level);
free(str);
u_free(str);
return 0;
}