diff options
author | Thomas Haller <thaller@redhat.com> | 2016-06-06 13:12:50 +0200 |
---|---|---|
committer | Thomas Haller <thaller@redhat.com> | 2016-06-06 13:12:50 +0200 |
commit | 2dc0ee29f6feab2c0dc89d0c87f910b45c077f56 (patch) | |
tree | 75722300aab15d296da36c0226151dc25cdc1955 | |
parent | ed7ee64d4e92f1aad14f53ec8898d1ae0a319c86 (diff) | |
download | NetworkManager-2dc0ee29f6feab2c0dc89d0c87f910b45c077f56.tar.gz |
clients: fix compilation without NM_MORE_ASSERTS
It would render _assert_format_int() unused and warn.
Fixes: 466bf2f6332e15a447a40e2a92b7f4493502855a
-rw-r--r-- | clients/tui/nm-editor-utils.c | 7 |
1 files changed, 3 insertions, 4 deletions
diff --git a/clients/tui/nm-editor-utils.c b/clients/tui/nm-editor-utils.c index 4040e6ce05..37eceb4397 100644 --- a/clients/tui/nm-editor-utils.c +++ b/clients/tui/nm-editor-utils.c @@ -252,7 +252,7 @@ nm_editor_utils_get_connection_type_list (void) return list; } -static void +static gboolean _assert_format_int (const char *format) { g_assert (format); @@ -260,6 +260,7 @@ _assert_format_int (const char *format) g_assert (format); g_assert (!strchr (format, '%')); g_assert (format[1] == 'd'); + return TRUE; } static char * @@ -271,9 +272,7 @@ get_available_connection_name (const char *format, char *cname = NULL; int i = 0; -#if NM_MORE_ASSERTS - _assert_format_int (format); -#endif + nm_assert (_assert_format_int (format)); conns = nm_client_get_connections (client); for (i = 0; i < conns->len; i++) { |