From: Jens Axboe Date: Sat, 8 Feb 2014 03:52:32 +0000 (-0700) Subject: crc: ensure we properly match test name X-Git-Tag: fio-2.1.5~7 X-Git-Url: https://git.kernel.dk/?p=fio.git;a=commitdiff_plain;h=f754086950c511d48af21aee5c49e9d7985d3d32;hp=005f702b8aad1352ced5295aebafc94b048ac02b crc: ensure we properly match test name Signed-off-by: Jens Axboe --- 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; }