]> git.ipfire.org Git - thirdparty/libvirt.git/commitdiff
tests: Don't wrap virTestDifference() arguments in NULLSTR()
authorMichal Privoznik <mprivozn@redhat.com>
Wed, 30 Nov 2022 08:47:08 +0000 (09:47 +0100)
committerMichal Privoznik <mprivozn@redhat.com>
Thu, 1 Dec 2022 13:22:39 +0000 (14:22 +0100)
The virTestDifference() is perfectly capable of handling NULL
arguments. There's no need to wrap arguments in NULLSTR().

Signed-off-by: Michal Privoznik <mprivozn@redhat.com>
Reviewed-by: Jonathon Jongsma <jjongsma@redhat.com>
tests/virnetdevbandwidthtest.c
tests/virnetdevopenvswitchtest.c

index d5e4092fc385716a60646932151296d0d75d9c12..fced6578116c3cbe9a750c806d006f99ce5f4b4c 100644 (file)
@@ -93,9 +93,7 @@ testVirNetDevBandwidthSet(const void *data)
     }
 
     if (STRNEQ_NULLABLE(exp_cmd, actual_cmd)) {
-        virTestDifference(stderr,
-                          NULLSTR(exp_cmd),
-                          NULLSTR(actual_cmd));
+        virTestDifference(stderr, exp_cmd, actual_cmd);
         return -1;
     }
 
index 57860f4bc422b8fed9f1428aebf2c5cc698c936e..e5883eb07608d9ddd9e717df4bdfcae1e1c83126 100644 (file)
@@ -176,9 +176,7 @@ testVirNetDevOpenvswitchInterfaceSetQos(const void *data)
     }
 
     if (STRNEQ_NULLABLE(info->exp_cmd, actual_cmd)) {
-        virTestDifference(stderr,
-                          NULLSTR(info->exp_cmd),
-                          NULLSTR(actual_cmd));
+        virTestDifference(stderr, info->exp_cmd, actual_cmd);
         return -1;
     }
 
@@ -207,9 +205,7 @@ testVirNetDevOpenvswitchInterfaceClearQos(const void *data)
     }
 
     if (STRNEQ_NULLABLE(info->exp_cmd, actual_cmd)) {
-        virTestDifference(stderr,
-                          NULLSTR(info->exp_cmd),
-                          NULLSTR(actual_cmd));
+        virTestDifference(stderr, info->exp_cmd, actual_cmd);
         return -1;
     }