It's possible that the @outbuf and/or @errbuf could be NULL
and thus we need to use the right comparison macro.
Found by Coverity
Signed-off-by: John Ferlan <jferlan@redhat.com>
ACKed-by: Michal Privoznik <mprivozn@redhat.com>
if (virTestGetVerbose())
printf("STDOUT:%s\nSTDERR:%s\n", NULLSTR(outbuf), NULLSTR(errbuf));
- if (STRNEQ(outbuf, outbufExpected)) {
+ if (STRNEQ_NULLABLE(outbuf, outbufExpected)) {
virTestDifference(stderr, outbufExpected, outbuf);
goto cleanup;
}
- if (STRNEQ(errbuf, errbufExpected)) {
+ if (STRNEQ_NULLABLE(errbuf, errbufExpected)) {
virTestDifference(stderr, errbufExpected, errbuf);
goto cleanup;
}