summaryrefslogtreecommitdiff
path: root/test
diff options
context:
space:
mode:
Diffstat (limited to 'test')
-rw-r--r--test/cmd_ut.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/test/cmd_ut.c b/test/cmd_ut.c
index 400719e7b6..a3a9d49f7e 100644
--- a/test/cmd_ut.c
+++ b/test/cmd_ut.c
@@ -26,7 +26,7 @@ int cmd_ut_category(const char *name, const char *prefix,
const char *test_name = test->name;
/* Remove the prefix */
- if (!strncmp(test_name, prefix, prefix_len))
+ if (prefix && !strncmp(test_name, prefix, prefix_len))
test_name += prefix_len;
if (argc > 1 && strcmp(argv[1], test_name))