about summary refs log tree commit diff
path: root/string
diff options
context:
space:
mode:
Diffstat (limited to 'string')
-rw-r--r--string/test-strcasestr.c3
-rw-r--r--string/test-strstr.c3
2 files changed, 4 insertions, 2 deletions
diff --git a/string/test-strcasestr.c b/string/test-strcasestr.c
index 0a16f85dcd..7649cc6e1d 100644
--- a/string/test-strcasestr.c
+++ b/string/test-strcasestr.c
@@ -67,7 +67,8 @@ 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 == NULL) ? "(null)" : result,
+	     (exp_result == NULL) ? "(null)" : exp_result);
       ret = 1;
       return -1;
     }
diff --git a/string/test-strstr.c b/string/test-strstr.c
index 031aff5534..df6dbc251e 100644
--- a/string/test-strstr.c
+++ b/string/test-strstr.c
@@ -66,7 +66,8 @@ 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 == NULL) ? "(null)" : result,
+	     (exp_result == NULL) ? "(null)" : exp_result);
       ret = 1;
       return -1;
     }