summaryrefslogtreecommitdiff
path: root/src/tests
diff options
context:
space:
mode:
authorThomas Haller <thaller@redhat.com>2015-10-27 10:25:22 +0100
committerThomas Haller <thaller@redhat.com>2015-11-02 13:57:01 +0100
commit9369fac8ca18f47541526068e83b652646153c18 (patch)
treea934469afdd2d9bbe2f33b14b77605512c89f70f /src/tests
parent99f9785345d3c65509da033c1f7c0d6a14a85e6b (diff)
downloadNetworkManager-9369fac8ca18f47541526068e83b652646153c18.tar.gz
core: add nm_utils_to_string_buffer global buffer
Having a static string buffer for convenience is useful not only for platform. Define the string buffer in NetworkManagerUtils.h, so that all to-string functions can reuse *one* buffer. Of course, this has the potential danger, that different to-string method might reuse the same buffer. Hence, low-level library functions are adviced to use their own buffer, because an upper level might already use the global buffer for another string.
Diffstat (limited to 'src/tests')
-rw-r--r--src/tests/test-route-manager.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/src/tests/test-route-manager.c b/src/tests/test-route-manager.c
index 09862d2368..eba7d9ef77 100644
--- a/src/tests/test-route-manager.c
+++ b/src/tests/test-route-manager.c
@@ -797,7 +797,7 @@ _assert_route_check (const NMPlatformVTableRoute *vtable, gboolean has, const NM
if (!has) {
g_assert (!r);
} else {
- char buf[sizeof (_nm_platform_to_string_buffer)];
+ char buf[sizeof (_nm_utils_to_string_buffer)];
if (!r || vtable->route_cmp (route, r) != 0)
g_error ("Invalid route. Expect %s, has %s",