From: Josef 'Jeff' Sipek Date: Sat, 30 Jun 2018 14:08:27 +0000 (-0400) Subject: lib: Change event_set_forced_debug(e, FALSE) to be a no-op X-Git-Tag: 2.3.3.rc1~138 X-Git-Url: http://git.ipfire.org/?a=commitdiff_plain;h=c5dc248e7796c633d80309c4bd11cb019496e2c8;p=thirdparty%2Fdovecot%2Fcore.git lib: Change event_set_forced_debug(e, FALSE) to be a no-op --- diff --git a/src/lib/event-log.c b/src/lib/event-log.c index 2e3f72e027..ee9aa48273 100644 --- a/src/lib/event-log.c +++ b/src/lib/event-log.c @@ -202,7 +202,8 @@ void event_logv(struct event *event, const struct event_log_params *params, struct event *event_set_forced_debug(struct event *event, bool force) { - event->forced_debug = force; + if (force) + event->forced_debug = TRUE; return event; } diff --git a/src/lib/event-log.h b/src/lib/event-log.h index 77f61805f0..b11999089b 100644 --- a/src/lib/event-log.h +++ b/src/lib/event-log.h @@ -58,12 +58,8 @@ void event_logv(struct event *event, const struct event_log_params *params, afterwards. It doesn't apply to existing child events (mainly for performance reasons). - Note that it's always recommended to use e.g.: - if (set->debug) event_set_forced_debug(event, TRUE); // good - instead of - event_set_forced_debug(event, set->debug); // bad - This is because the event may already have had debugging enabled via the - parent event. Forcing it to FALSE is most likely not wanted. */ + Note that event_set_forced_debug(event, FALSE) is a no-op. To disable + forced-debug, use event_unset_forced_debug(event). */ struct event *event_set_forced_debug(struct event *event, bool force); /* Set the forced-debug to FALSE */ struct event *event_unset_forced_debug(struct event *event);