summaryrefslogtreecommitdiff
path: root/src/dhcp/nm-dhcp-utils.c
diff options
context:
space:
mode:
authorThomas Haller <thaller@redhat.com>2018-02-14 13:09:23 +0100
committerThomas Haller <thaller@redhat.com>2018-02-15 16:08:00 +0100
commit578c4af907cd1f5a93aacb024f983b7eb5b40362 (patch)
treee95b1430fbe1deabbc95f2e40de2114d030472e0 /src/dhcp/nm-dhcp-utils.c
parentb0e9856196bc4b321228a586af4f2f7f0e0c7f15 (diff)
downloadNetworkManager-578c4af907cd1f5a93aacb024f983b7eb5b40362.tar.gz
dhcp: refactor type of NMDhcpClient duid to be GBytes
GBytes is immutable. It's better suited to contain the duid parameter then a GByteArray.
Diffstat (limited to 'src/dhcp/nm-dhcp-utils.c')
-rw-r--r--src/dhcp/nm-dhcp-utils.c8
1 files changed, 6 insertions, 2 deletions
diff --git a/src/dhcp/nm-dhcp-utils.c b/src/dhcp/nm-dhcp-utils.c
index 50ca2abe2d..9185a135a2 100644
--- a/src/dhcp/nm-dhcp-utils.c
+++ b/src/dhcp/nm-dhcp-utils.c
@@ -721,11 +721,15 @@ error:
}
char *
-nm_dhcp_utils_duid_to_string (const GByteArray *duid)
+nm_dhcp_utils_duid_to_string (GBytes *duid)
{
+ gconstpointer data;
+ gsize len;
+
g_return_val_if_fail (duid != NULL, NULL);
- return _nm_utils_bin2str (duid->data, duid->len, FALSE);
+ data = g_bytes_get_data (duid, &len);
+ return _nm_utils_bin2str (data, len, FALSE);
}
/**