libnm/keyfile/trivial: rename VPN_SECRETS_GROUP define to NM_KEYFILE_GROUP_VPN_SECRETS
authorThomas Haller <thaller@redhat.com>
Mon, 8 Jun 2015 17:38:52 +0000 (19:38 +0200)
committerThomas Haller <thaller@redhat.com>
Sun, 14 Feb 2016 10:14:35 +0000 (11:14 +0100)
It is a define from an internal header. Still, all defines in headers
should be named with a NM prefix.

libnm-core/nm-keyfile-reader.c
libnm-core/nm-keyfile-utils.h
libnm-core/nm-keyfile-writer.c

index 5f3d1ee..1e972cf 100644 (file)
@@ -1538,11 +1538,11 @@ read_vpn_secrets (KeyfileReaderInfo *info, NMSettingVpn *s_vpn)
 {
        char **keys, **iter;
 
-       keys = nm_keyfile_plugin_kf_get_keys (info->keyfile, VPN_SECRETS_GROUP, NULL, NULL);
+       keys = nm_keyfile_plugin_kf_get_keys (info->keyfile, NM_KEYFILE_GROUP_VPN_SECRETS, NULL, NULL);
        for (iter = keys; *iter; iter++) {
                char *secret;
 
-               secret = nm_keyfile_plugin_kf_get_string (info->keyfile, VPN_SECRETS_GROUP, *iter, NULL);
+               secret = nm_keyfile_plugin_kf_get_string (info->keyfile, NM_KEYFILE_GROUP_VPN_SECRETS, *iter, NULL);
                if (secret) {
                        nm_setting_vpn_add_secret (s_vpn, *iter, secret);
                        g_free (secret);
@@ -1620,7 +1620,7 @@ nm_keyfile_read (GKeyFile *keyfile,
                length = 0;
        for (i = 0; i < length; i++) {
                /* Only read out secrets when needed */
-               if (!strcmp (groups[i], VPN_SECRETS_GROUP)) {
+               if (!strcmp (groups[i], NM_KEYFILE_GROUP_VPN_SECRETS)) {
                        vpn_secrets = TRUE;
                        continue;
                }
index fd4334d..faa027d 100644 (file)
@@ -23,7 +23,7 @@
 
 #include <glib.h>
 
-#define VPN_SECRETS_GROUP "vpn-secrets"
+#define NM_KEYFILE_GROUP_VPN_SECRETS "vpn-secrets"
 
 const char *nm_keyfile_plugin_get_alias_for_setting_name (const char *setting_name);
 
index 466eddc..b794079 100644 (file)
@@ -247,7 +247,7 @@ write_hash_of_string (GKeyFile *file,
 
        /* Write VPN secrets out to a different group to keep them separate */
        if (NM_IS_SETTING_VPN (setting) && !strcmp (key, NM_SETTING_VPN_SECRETS)) {
-               group_name = VPN_SECRETS_GROUP;
+               group_name = NM_KEYFILE_GROUP_VPN_SECRETS;
                vpn_secrets = TRUE;
        }