]> git.ipfire.org Git - thirdparty/bacula.git/commitdiff
unittests: allow to use NULL in is() string checking function
authorEric Bollengier <eric@baculasystems.com>
Wed, 14 Sep 2022 13:43:18 +0000 (15:43 +0200)
committerEric Bollengier <eric@baculasystems.com>
Thu, 14 Sep 2023 11:56:59 +0000 (13:56 +0200)
bacula/src/lib/unittests.c

index b6d68e70d99b1e47d730794876dcc2aac0b3f111..4fdf7b8b02d2f0c973cb81b43a8dc8e957130b63 100644 (file)
@@ -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) {