summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorThomas Haller <thaller@redhat.com>2022-12-14 10:23:27 +0100
committerThomas Haller <thaller@redhat.com>2022-12-19 11:29:15 +0100
commitdf0408f0f6a9c38e8c9a4aed43efa02cb23de9b6 (patch)
tree56940d90ca676ebb767192cca56e5d945ea8ad55
parenta3e4f764d1a668a5a806d6e80d575189722f4d14 (diff)
downloadNetworkManager-df0408f0f6a9c38e8c9a4aed43efa02cb23de9b6.tar.gz
dhcp/trivial: rename DUID_PREFIX define to DEFAULT_DUID_PREFIX
-rw-r--r--src/core/dhcp/nm-dhcp-dhclient-utils.c10
1 files changed, 5 insertions, 5 deletions
diff --git a/src/core/dhcp/nm-dhcp-dhclient-utils.c b/src/core/dhcp/nm-dhcp-dhclient-utils.c
index 72dbc7885e..ae6828ad0a 100644
--- a/src/core/dhcp/nm-dhcp-dhclient-utils.c
+++ b/src/core/dhcp/nm-dhcp-dhclient-utils.c
@@ -606,7 +606,7 @@ error:
return NULL;
}
-#define DUID_PREFIX "default-duid \""
+#define DEFAULT_DUID_PREFIX "default-duid \""
/* Beware: @error may be unset even if the function returns %NULL. */
GBytes *
@@ -627,10 +627,10 @@ nm_dhcp_dhclient_read_duid(const char *leasefile, GError **error)
const char *p = nm_str_skip_leading_spaces(contents_v[i]);
GBytes *duid;
- if (!NM_STR_HAS_PREFIX(p, DUID_PREFIX))
+ if (!NM_STR_HAS_PREFIX(p, DEFAULT_DUID_PREFIX))
continue;
- p += NM_STRLEN(DUID_PREFIX);
+ p += NM_STRLEN(DEFAULT_DUID_PREFIX);
g_strchomp((char *) p);
@@ -678,7 +678,7 @@ nm_dhcp_dhclient_save_duid(const char *leasefile, GBytes *duid, GError **error)
}
s = g_string_sized_new(len + 50);
- g_string_append_printf(s, DUID_PREFIX "%s\";\n", escaped_duid);
+ g_string_append_printf(s, DEFAULT_DUID_PREFIX "%s\";\n", escaped_duid);
/* Preserve existing leasefile contents */
if (lines) {
@@ -691,7 +691,7 @@ nm_dhcp_dhclient_save_duid(const char *leasefile, GBytes *duid, GError **error)
* to update the lease file, otherwise skip the old DUID.
*/
l = nm_str_skip_leading_spaces(str);
- if (g_str_has_prefix(l, DUID_PREFIX)) {
+ if (g_str_has_prefix(l, DEFAULT_DUID_PREFIX)) {
gs_strfreev char **split = NULL;
split = g_strsplit(l, "\"", -1);