From: Michal Privoznik Date: Wed, 30 Nov 2022 08:47:08 +0000 (+0100) Subject: tests: Don't wrap virTestDifference() arguments in NULLSTR() X-Git-Tag: v9.0.0-rc1~266 X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=1fffd1605df473183b64d6479edc2b2ca1fb57f1;p=thirdparty%2Flibvirt.git tests: Don't wrap virTestDifference() arguments in NULLSTR() The virTestDifference() is perfectly capable of handling NULL arguments. There's no need to wrap arguments in NULLSTR(). Signed-off-by: Michal Privoznik Reviewed-by: Jonathon Jongsma --- diff --git a/tests/virnetdevbandwidthtest.c b/tests/virnetdevbandwidthtest.c index d5e4092fc3..fced657811 100644 --- a/tests/virnetdevbandwidthtest.c +++ b/tests/virnetdevbandwidthtest.c @@ -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; } diff --git a/tests/virnetdevopenvswitchtest.c b/tests/virnetdevopenvswitchtest.c index 57860f4bc4..e5883eb076 100644 --- a/tests/virnetdevopenvswitchtest.c +++ b/tests/virnetdevopenvswitchtest.c @@ -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; }