summaryrefslogtreecommitdiff
path: root/src/tests/test-ip6-config.c
diff options
context:
space:
mode:
authorThomas Haller <thaller@redhat.com>2015-10-12 10:27:33 +0200
committerThomas Haller <thaller@redhat.com>2015-11-01 17:28:08 +0100
commita2d59f5f102a5d6a353769f72571c3cad8d7c3d4 (patch)
tree8e69d232eb1017ce801b29364c73b70a29684ff9 /src/tests/test-ip6-config.c
parent7e2710fcd03ebd11c70efbc3904b3812b001db5b (diff)
platform: add buffer argument to platform to-string functions
Arguably, it is more convenient to use the static buffer as it saves typing. But having such a low-level function use a static buffer also limits the way how to use it. As it was, you could not avoid using the static buffer. E.g. you cannot do: char buf[100]; _LOGD ("nmp-object: %s; platform-link: %s", nmp_object_to_string (nmpobj, buf, sizeof(buf)), nm_platform_link_to_string (link)); This will fail for non-obvious reasons because both to-string functions end up using the same static buffer. Also change the to-string implementations to accept NULL as valid and return it as "(null)". https://bugzilla.gnome.org/show_bug.cgi?id=756427
Diffstat (limited to 'src/tests/test-ip6-config.c')
-rw-r--r--src/tests/test-ip6-config.c4
1 files changed, 2 insertions, 2 deletions
diff --git a/src/tests/test-ip6-config.c b/src/tests/test-ip6-config.c
index 8b59f6c47..0977ded43 100644
--- a/src/tests/test-ip6-config.c
+++ b/src/tests/test-ip6-config.c
@@ -264,8 +264,8 @@ test_nm_ip6_config_addresses_sort_check (NMIP6Config *config, NMSettingIP6Config
if (!nm_ip6_config_equal (copy, config)) {
g_message ("%s", "SORTING yields unexpected output:");
for (i = 0; i < addr_count; i++) {
- g_message (" >> [%d] = %s", i, nm_platform_ip6_address_to_string (nm_ip6_config_get_address (config, i)));
- g_message (" << [%d] = %s", i, nm_platform_ip6_address_to_string (nm_ip6_config_get_address (copy, i)));
+ g_message (" >> [%d] = %s", i, nm_platform_ip6_address_to_string (nm_ip6_config_get_address (config, i), NULL, 0));
+ g_message (" << [%d] = %s", i, nm_platform_ip6_address_to_string (nm_ip6_config_get_address (copy, i), NULL, 0));
}
g_assert_not_reached ();
}