f2fstat: fix option parsing
On systems using unsigned char as default (char)EOF != EOF.
Use int to store returned value of getopt to make it work on all platforms.
Signed-off-by: Michael Lass <bevan@bi-co.net>
Signed-off-by: Jaegeuk Kim <jaegeuk@kernel.org>
diff --git a/tools/f2fstat.c b/tools/f2fstat.c
index 8643797..7f485b0 100644
--- a/tools/f2fstat.c
+++ b/tools/f2fstat.c
@@ -191,7 +191,7 @@
void parse_option(int argc, char *argv[], struct options *opt)
{
- char option;
+ int option;
const char *option_string = "d:i:p:h";
while ((option = getopt(argc, argv, option_string)) != EOF) {