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 --- nandwrite.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'nandwrite.c') diff --git a/nandwrite.c b/nandwrite.c index bbe69b0..5373a89 100644 --- a/nandwrite.c +++ b/nandwrite.c @@ -201,7 +201,7 @@ static void process_options(int argc, char * const argv[]) writeoob = true; break; case 's': - mtdoffset = strtoll(optarg, NULL, 0); + mtdoffset = simple_strtoll(optarg, &error); break; case 'b': blockalign = atoi(optarg); -- cgit v1.2.3