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.
This commit is contained in:
@@ -447,8 +447,7 @@ nm_logging_all_domains_to_string (void)
|
|||||||
gboolean
|
gboolean
|
||||||
nm_logging_enabled (NMLogLevel level, NMLogDomain domain)
|
nm_logging_enabled (NMLogLevel level, NMLogDomain domain)
|
||||||
{
|
{
|
||||||
if ((guint) level >= G_N_ELEMENTS (global.logging))
|
nm_assert (((guint) level) < G_N_ELEMENTS (global.logging));
|
||||||
g_return_val_if_reached (FALSE);
|
|
||||||
|
|
||||||
return !!(global.logging[level] & domain);
|
return !!(global.logging[level] & domain);
|
||||||
}
|
}
|
||||||
|
Reference in New Issue
Block a user