From f754086950c511d48af21aee5c49e9d7985d3d32 Mon Sep 17 00:00:00 2001 From: Jens Axboe Date: Fri, 7 Feb 2014 20:52:32 -0700 Subject: [PATCH] crc: ensure we properly match test name Signed-off-by: Jens Axboe --- crc/test.c | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/crc/test.c b/crc/test.c index 2ea4f3d7..5812b358 100644 --- a/crc/test.c +++ b/crc/test.c @@ -17,8 +17,8 @@ #include "../crc/sha256.h" #include "../crc/sha512.h" -#define CHUNK 131072 -#define NR_CHUNKS 2048 +#define CHUNK 131072U +#define NR_CHUNKS 2048U struct test_type { const char *name; @@ -295,7 +295,7 @@ static unsigned int get_test_mask(const char *type) mask = 0; while ((name = strsep(&str, ",")) != NULL) { for (i = 0; t[i].name; i++) { - if (!strncmp(t[i].name, name, strlen(t[i].name))) { + if (!strcmp(t[i].name, name)) { mask |= t[i].mask; break; } -- 2.25.1