summary refs log tree commit diff
path: root/src/nm-config-data.c
diff options
context:
space:
mode:
Diffstat (limited to 'src/nm-config-data.c')
-rw-r--r--src/nm-config-data.c16
1 files changed, 7 insertions, 9 deletions
diff --git a/src/nm-config-data.c b/src/nm-config-data.c
index e2b6c3a6..1702b551 100644
--- a/src/nm-config-data.c
+++ b/src/nm-config-data.c
@@ -19,7 +19,7 @@
  * Copyright (C) 2013 Thomas Bechtold <thomasbechtold@jpberlin.de>
  */
 
-#include "config.h"
+#include "nm-default.h"
 
 #include "nm-config-data.h"
 
@@ -29,8 +29,6 @@
 #include "nm-device.h"
 #include "nm-core-internal.h"
 #include "nm-keyfile-internal.h"
-#include "nm-macros-internal.h"
-#include "nm-default.h"
 
 typedef struct {
 	char *group_name;
@@ -118,7 +116,7 @@ G_DEFINE_TYPE (NMConfigData, nm_config_data, G_TYPE_OBJECT)
 #define _HAS_PREFIX(str, prefix) \
 	({ \
 		const char *_str = (str); \
-		g_str_has_prefix ( _str, ""prefix"") && _str[STRLEN(prefix)] != '\0'; \
+		g_str_has_prefix ( _str, ""prefix"") && _str[NM_STRLEN(prefix)] != '\0'; \
 	})
 
 /************************************************************************/
@@ -325,7 +323,7 @@ _nm_config_data_get_keyfile_user (const NMConfigData *self)
  * nm_config_data_get_groups:
  * @self: the #NMConfigData instance
  *
- * Returns: (transfer-full): the list of groups in the configuration. The order
+ * Returns: (transfer full): the list of groups in the configuration. The order
  * of the section is undefined, as the configuration gets merged from multiple
  * sources.
  */
@@ -431,7 +429,7 @@ _merge_keyfiles (GKeyFile *keyfile_user, GKeyFile *keyfile_intern)
 
 			if (   !is_intern && !is_atomic
 			    && _HAS_PREFIX (key, NM_CONFIG_KEYFILE_KEYPREFIX_WAS)) {
-				const char *key_base = &key[STRLEN (NM_CONFIG_KEYFILE_KEYPREFIX_WAS)];
+				const char *key_base = &key[NM_STRLEN (NM_CONFIG_KEYFILE_KEYPREFIX_WAS)];
 
 				if (!g_key_file_has_key (keyfile_intern, group, key_base, NULL))
 					g_key_file_remove_key (keyfile, group, key_base, NULL);
@@ -474,8 +472,8 @@ _nm_config_data_log_sort (const char **pa, const char **pb, gpointer dummy)
 
 	if (a_is_connection && b_is_connection) {
 		/* if both are connection groups, we want the explicit [connection] group first. */
-		a_is_connection = a[STRLEN (NM_CONFIG_KEYFILE_GROUPPREFIX_CONNECTION)] == '\0';
-		b_is_connection = b[STRLEN (NM_CONFIG_KEYFILE_GROUPPREFIX_CONNECTION)] == '\0';
+		a_is_connection = a[NM_STRLEN (NM_CONFIG_KEYFILE_GROUPPREFIX_CONNECTION)] == '\0';
+		b_is_connection = b[NM_STRLEN (NM_CONFIG_KEYFILE_GROUPPREFIX_CONNECTION)] == '\0';
 
 		if (a_is_connection != b_is_connection) {
 			if (a_is_connection)
@@ -1127,7 +1125,7 @@ _get_connection_infos (GKeyFile *keyfile)
 	else if (ngroups > 0) {
 		for (i = 0, j = 0; i < ngroups; i++) {
 			if (g_str_has_prefix (groups[i], NM_CONFIG_KEYFILE_GROUPPREFIX_CONNECTION)) {
-				if (groups[i][STRLEN (NM_CONFIG_KEYFILE_GROUPPREFIX_CONNECTION)] == '\0')
+				if (groups[i][NM_STRLEN (NM_CONFIG_KEYFILE_GROUPPREFIX_CONNECTION)] == '\0')
 					connection_tag = groups[i];
 				else
 					groups[j++] = groups[i];