diff options
Diffstat (limited to 'src')
-rw-r--r-- | src/logging.c | 5 |
1 files changed, 5 insertions, 0 deletions
diff --git a/src/logging.c b/src/logging.c index 2a8bfdc8..d32ca43a 100644 --- a/src/logging.c +++ b/src/logging.c @@ -336,6 +336,11 @@ err: * which should never happen unless even the DLGLOBAL category is missing. */ static inline int map_subsys(int subsys) { + /* Note: comparing signed and unsigned integers */ + + if (subsys > 0 && ((unsigned int)subsys) >= osmo_log_info->num_cat_user) + subsys = DLGLOBAL; + if (subsys < 0) subsys = subsys_lib2index(subsys); |