summary refs log tree commit diff
path: root/src/core/nm-test-utils-core.h
diff options
context:
space:
mode:
authorMichael Biebl <biebl@debian.org>2022-05-04 15:35:24 +0200
committerMichael Biebl <biebl@debian.org>2022-05-04 15:35:24 +0200
commit9959fdb2e8ddd06f2161798ca0a39c77d67c652d (patch)
tree2ce24a336d2b1c5fd5dec3090db312eded6c78ba /src/core/nm-test-utils-core.h
parent8c623dddbdebe354cb94bfc559a5371a14865317 (diff)
New upstream version 1.37.92 upstream/1.37.92
Diffstat (limited to 'src/core/nm-test-utils-core.h')
-rw-r--r--src/core/nm-test-utils-core.h14
1 files changed, 8 insertions, 6 deletions
diff --git a/src/core/nm-test-utils-core.h b/src/core/nm-test-utils-core.h
index 6f571972..467f9bb2 100644
--- a/src/core/nm-test-utils-core.h
+++ b/src/core/nm-test-utils-core.h
@@ -211,12 +211,13 @@ nmtst_platform_ip4_routes_equal(const NMPlatformIP4Route *a,
 
     for (i = 0; i < len; i++) {
         if (nm_platform_ip4_route_cmp_full(&a[i], &b[i]) != 0) {
-            char buf[sizeof(_nm_utils_to_string_buffer)];
+            char buf1[NM_UTILS_TO_STRING_BUFFER_SIZE];
+            char buf2[NM_UTILS_TO_STRING_BUFFER_SIZE];
 
             g_error("Error comparing IPv4 route[%lu]: %s vs %s",
                     (unsigned long) i,
-                    nm_platform_ip4_route_to_string(&a[i], NULL, 0),
-                    nm_platform_ip4_route_to_string(&b[i], buf, sizeof(buf)));
+                    nm_platform_ip4_route_to_string(&a[i], buf1, sizeof(buf1)),
+                    nm_platform_ip4_route_to_string(&b[i], buf2, sizeof(buf2)));
             g_assert_not_reached();
         }
     }
@@ -280,12 +281,13 @@ nmtst_platform_ip6_routes_equal(const NMPlatformIP6Route *a,
 
     for (i = 0; i < len; i++) {
         if (nm_platform_ip6_route_cmp_full(&a[i], &b[i]) != 0) {
-            char buf[sizeof(_nm_utils_to_string_buffer)];
+            char buf1[NM_UTILS_TO_STRING_BUFFER_SIZE];
+            char buf2[NM_UTILS_TO_STRING_BUFFER_SIZE];
 
             g_error("Error comparing IPv6 route[%lu]: %s vs %s",
                     (unsigned long) i,
-                    nm_platform_ip6_route_to_string(&a[i], NULL, 0),
-                    nm_platform_ip6_route_to_string(&b[i], buf, sizeof(buf)));
+                    nm_platform_ip6_route_to_string(&a[i], buf1, sizeof(buf1)),
+                    nm_platform_ip6_route_to_string(&b[i], buf2, sizeof(buf2)));
             g_assert_not_reached();
         }
     }