From 340ccfc90f78e3fb762ce3da1ed5fbcd2e02a2bf Mon Sep 17 00:00:00 2001 From: Brian Norris Date: Mon, 29 Nov 2010 00:01:55 -0800 Subject: nanddump/nandwrite: use "simple_" str functions Per Mike Frysinger's suggestion, we check for strtoll() and strtoull() errors by using the "common.h" helper functions simple_strtoll() and simple_strtoull(). Signed-off-by: Brian Norris Signed-off-by: Artem Bityutskiy --- nanddump.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) (limited to 'nanddump.c') diff --git a/nanddump.c b/nanddump.c index fe29596..bf95e81 100644 --- a/nanddump.c +++ b/nanddump.c @@ -136,7 +136,7 @@ static void process_options(int argc, char * const argv[]) omitbad = true; break; case 's': - start_addr = strtoull(optarg, NULL, 0); + start_addr = simple_strtoull(optarg, &error); break; case 'f': if (!(dumpfile = strdup(optarg))) { @@ -145,7 +145,7 @@ static void process_options(int argc, char * const argv[]) } break; case 'l': - length = strtoull(optarg, NULL, 0); + length = simple_strtoull(optarg, &error); break; case 'o': omitoob = true; -- cgit v1.2.3