Message ID | 1291017722-23985-8-git-send-email-computersforpeace@gmail.com |
---|---|
State | New, archived |
Headers | show |
diff --git a/nandwrite.c b/nandwrite.c index c409878..c51efd7 100644 --- a/nandwrite.c +++ b/nandwrite.c @@ -212,11 +212,9 @@ static void process_options(int argc, char * const argv[]) } } - if (mtdoffset < 0) { - fprintf(stderr, "Can't specify a negative device offset `%lld'\n", + if (mtdoffset < 0) + errmsg_die("Can't specify a negative device offset '%lld'", mtdoffset); - exit(EXIT_FAILURE); - } if (blockalign < 0) errmsg_die("Can't specify a negative blockalign '%d'",
errmsg_die() should be nearly the equivalent of the error message used here. This saves a few lines. Signed-off-by: Brian Norris <computersforpeace@gmail.com> --- nandwrite.c | 6 ++---- 1 files changed, 2 insertions(+), 4 deletions(-)