From 7fe481b472006bc6f4197e5b5f6c7da0f7ed0e4f Mon Sep 17 00:00:00 2001 From: Tomohiro Kusumi Date: Wed, 27 Jul 2016 22:37:10 +0900 Subject: [PATCH 1/1] Use sizeof(char*) instead of sizeof(void*) Conform to the exact data type though both pointers are normally expected to be the same size on various archs. Signed-off-by: Tomohiro Kusumi Signed-off-by: Jens Axboe --- options.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/options.c b/options.c index 4461643e..4c56dbe1 100644 --- a/options.c +++ b/options.c @@ -258,7 +258,7 @@ static int str2error(char *str) "EINVAL", "ENFILE", "EMFILE", "ENOTTY", "ETXTBSY","EFBIG", "ENOSPC", "ESPIPE", "EROFS","EMLINK", "EPIPE", "EDOM", "ERANGE" }; - int i = 0, num = sizeof(err) / sizeof(void *); + int i = 0, num = sizeof(err) / sizeof(char *); while (i < num) { if (!strcmp(err[i], str)) -- 2.25.1