On Jun 17 2019, Stefan Liebler <stli@linux.ibm.com> wrote:
diff --git a/benchtests/bench-strstr.c b/benchtests/bench-strstr.c
index 2cbe13e9ac..14053e7a22 100644
--- a/benchtests/bench-strstr.c
+++ b/benchtests/bench-strstr.c
@@ -147,7 +147,7 @@ do_one_test (impl_t *impl, const char *s1, const char *s2, char *exp_result)
if (res != exp_result)
{
error (0, 0, "Wrong result in function %s %s %s", impl->name,
- res, exp_result);
+ res, (exp_result == NULL) ? "NULL" : exp_result);
res can be NULL too.
diff --git a/string/test-strcasestr.c b/string/test-strcasestr.c
index 0a16f85dcd..1773581a3e 100644
--- a/string/test-strcasestr.c
+++ b/string/test-strcasestr.c
@@ -67,7 +67,7 @@ check_result (impl_t *impl, const char *s1, const char *s2,
if (result != exp_result)
{
error (0, 0, "Wrong result in function %s %s %s", impl->name,
- result, exp_result);
+ result, (exp_result == NULL) ? "NULL" : exp_result);
result can be NULL too.
Andreas.