From 1a070f6a44a0f1a39c174425be96dd8834bea25e Mon Sep 17 00:00:00 2001 From: Thomas Haller Date: Thu, 19 May 2016 18:58:42 +0200 Subject: [PATCH] logging: remove assertion in nm_logging_enabled() from production builds We really expect this assertion not to be violated. As we want for nm_logging_enabled() to become smaller and inline, remove the runtime assertion from regular builds. Live fast and dangerous. --- src/nm-logging.c | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/src/nm-logging.c b/src/nm-logging.c index c00b56de48..30932440c2 100644 --- a/src/nm-logging.c +++ b/src/nm-logging.c @@ -447,8 +447,7 @@ nm_logging_all_domains_to_string (void) gboolean nm_logging_enabled (NMLogLevel level, NMLogDomain domain) { - if ((guint) level >= G_N_ELEMENTS (global.logging)) - g_return_val_if_reached (FALSE); + nm_assert (((guint) level) < G_N_ELEMENTS (global.logging)); return !!(global.logging[level] & domain); }