mirror of
https://gitlab.freedesktop.org/NetworkManager/NetworkManager.git
synced 2025-12-30 05:00:10 +01:00
make use of NM_MORE_ASSERTS, nm_assert() and NM_MORE_LOGGING
This commit is contained in:
parent
63593a19d8
commit
1eaddced10
2 changed files with 5 additions and 9 deletions
|
|
@ -3379,11 +3379,9 @@ _nm_utils_ascii_str_to_int64 (const char *str, guint base, gint64 min, gint64 ma
|
|||
memcpy (s, str, len);
|
||||
s[len] = 0;
|
||||
|
||||
/*
|
||||
g_assert (len > 0 && len < strlen (str) && len == strlen (s));
|
||||
g_assert (!g_ascii_isspace (str[len-1]) && g_ascii_isspace (str[len]));
|
||||
g_assert (strncmp (str, s, len) == 0);
|
||||
*/
|
||||
nm_assert (len > 0 && len < strlen (str) && len == strlen (s));
|
||||
nm_assert (!g_ascii_isspace (str[len-1]) && g_ascii_isspace (str[len]));
|
||||
nm_assert (strncmp (str, s, len) == 0);
|
||||
|
||||
str = s;
|
||||
}
|
||||
|
|
|
|||
|
|
@ -28,8 +28,6 @@
|
|||
#include "gsystem-local-alloc.h"
|
||||
#include "NetworkManagerUtils.h"
|
||||
|
||||
//#define DEBUG_ROUTE_MANAGER
|
||||
|
||||
typedef struct {
|
||||
guint len;
|
||||
NMPlatformIPXRoute *entries[1];
|
||||
|
|
@ -110,7 +108,7 @@ static const VTableIP vtable_v4, vtable_v6;
|
|||
nm_logging_enabled (__level, __domain); \
|
||||
})
|
||||
|
||||
#ifdef DEBUG_ROUTE_MANAGER
|
||||
#ifdef NM_MORE_LOGGING
|
||||
#define _LOGT_ENABLED(addr_family) _LOG_LEVEL_ENABLED (LOGL_TRACE, addr_family)
|
||||
#define _LOGT(addr_family, ...) _LOG (LOGL_TRACE, addr_family, __VA_ARGS__)
|
||||
#else
|
||||
|
|
@ -125,7 +123,7 @@ static const VTableIP vtable_v4, vtable_v6;
|
|||
|
||||
/*********************************************************************************************/
|
||||
|
||||
#if defined (DEBUG_ROUTE_MANAGER) && !defined (G_DISABLE_ASSERT)
|
||||
#if defined (NM_MORE_ASSERTS) && !defined (G_DISABLE_ASSERT)
|
||||
inline static void
|
||||
ASSERT_route_index_valid (const VTableIP *vtable, const GArray *entries, const RouteIndex *index, gboolean unique_ifindexes)
|
||||
{
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue