Skip to content

Commit

Permalink
core: check logging protection before the level
Browse files Browse the repository at this point in the history
  • Loading branch information
miconda committed Jan 20, 2020
1 parent ec0dd71 commit 53ca8b5
Showing 1 changed file with 4 additions and 4 deletions.
8 changes: 4 additions & 4 deletions src/core/dprint.h
Expand Up @@ -214,8 +214,8 @@ void log_prefix_init(void);
# ifdef __SUNPRO_C
# define LOG__(facility, level, lname, prefix, fmt, ...) \
do { \
if (get_debug_level(LOG_MNAME, LOG_MNAME_LEN) >= (level) && \
DPRINT_NON_CRIT) { \
if (DPRINT_NON_CRIT \
&& get_debug_level(LOG_MNAME, LOG_MNAME_LEN) >= (level)) { \
int __llevel; \
__llevel = ((level)<L_ALERT)?L_ALERT:(((level)>L_DBG)?L_DBG:level); \
DPRINT_CRIT_ENTER; \
Expand Down Expand Up @@ -292,8 +292,8 @@ void log_prefix_init(void);
# else /* ! __SUNPRO_C */
# define LOG__(facility, level, lname, prefix, fmt, args...) \
do { \
if (get_debug_level(LOG_MNAME, LOG_MNAME_LEN) >= (level) && \
DPRINT_NON_CRIT) { \
if (DPRINT_NON_CRIT \
&& get_debug_level(LOG_MNAME, LOG_MNAME_LEN) >= (level) ) { \
int __llevel; \
__llevel = ((level)<L_ALERT)?L_ALERT:(((level)>L_DBG)?L_DBG:level); \
DPRINT_CRIT_ENTER; \
Expand Down

0 comments on commit 53ca8b5

Please sign in to comment.