diff options
author | Brian Norris <computersforpeace@gmail.com> | 2010-11-29 00:01:55 -0800 |
---|---|---|
committer | Artem Bityutskiy <Artem.Bityutskiy@nokia.com> | 2010-12-02 05:25:05 +0200 |
commit | 340ccfc90f78e3fb762ce3da1ed5fbcd2e02a2bf (patch) | |
tree | 10d18b10658fd3a64b0606bd19dcfa9624749ed5 /nanddump.c | |
parent | ae1cb618abbc591b7a63a09bc927f37968f889af (diff) |
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 <computersforpeace@gmail.com>
Signed-off-by: Artem Bityutskiy <Artem.Bityutskiy@nokia.com>
Diffstat (limited to 'nanddump.c')
-rw-r--r-- | nanddump.c | 4 |
1 files changed, 2 insertions, 2 deletions
@@ -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; |