From: Eric Bollengier Date: Wed, 14 Sep 2022 13:43:18 +0000 (+0200) Subject: unittests: allow to use NULL in is() string checking function X-Git-Tag: Beta-15.0.0~507 X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=368d938842f8f807345b1c107d9faf03cb381af7;p=thirdparty%2Fbacula.git unittests: allow to use NULL in is() string checking function --- diff --git a/bacula/src/lib/unittests.c b/bacula/src/lib/unittests.c index b6d68e70d..4fdf7b8b0 100644 --- a/bacula/src/lib/unittests.c +++ b/bacula/src/lib/unittests.c @@ -150,7 +150,7 @@ bool _nok(const char *file, int l, const char *op, int value, const char *label) bool _is(const char *file, int l, const char *op, const char *str, const char *str2, const char *label) { nb++; - bool value = (strcmp(str, str2) == 0); + bool value = (strcmp(NPRTB(str), NPRTB(str2)) == 0); if (!value) { err++; if (err < 1000) {