summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorJens Axboe <axboe@fb.com>2014-02-07 20:52:32 -0700
committerJens Axboe <axboe@fb.com>2014-02-07 20:52:32 -0700
commitf754086950c511d48af21aee5c49e9d7985d3d32 (patch)
tree62c852fa2b7013903e14f998531bf6b88e8f5442
parent005f702b8aad1352ced5295aebafc94b048ac02b (diff)
downloadfio-f754086950c511d48af21aee5c49e9d7985d3d32.tar.gz
fio-f754086950c511d48af21aee5c49e9d7985d3d32.tar.bz2
crc: ensure we properly match test name
Signed-off-by: Jens Axboe <axboe@fb.com>
-rw-r--r--crc/test.c6
1 files 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;
}