diff options
author | Edward Tomasz Napierala <trasz@FreeBSD.org> | 2016-02-21 14:36:50 +0000 |
---|---|---|
committer | Edward Tomasz Napierala <trasz@FreeBSD.org> | 2016-02-21 14:36:50 +0000 |
commit | 674677bd084eb8845dab81ad58c063f484546f81 (patch) | |
tree | 47b0f98fc5629732ca167835b588dc3049c5d3d8 /bin/dd/args.c | |
parent | 1e1bbb79fd726164b79f1c060f6ebb10ca7277a2 (diff) | |
download | src-674677bd084eb8845dab81ad58c063f484546f81.tar.gz src-674677bd084eb8845dab81ad58c063f484546f81.zip |
Notes
Diffstat (limited to 'bin/dd/args.c')
-rw-r--r-- | bin/dd/args.c | 14 |
1 files changed, 6 insertions, 8 deletions
diff --git a/bin/dd/args.c b/bin/dd/args.c index db8d445b5250..4607d673aa74 100644 --- a/bin/dd/args.c +++ b/bin/dd/args.c @@ -422,11 +422,10 @@ get_num(const char *val) errno = 0; num = strtoumax(val, &expr, 0); - if (errno != 0) /* Overflow or underflow. */ - err(1, "%s", oper); - if (expr == val) /* No valid digits. */ - errx(1, "%s: illegal numeric value", oper); + errx(1, "%s: invalid numeric value", oper); + if (errno != 0) + err(1, "%s", oper); mult = postfix_to_mult(*expr); @@ -472,11 +471,10 @@ get_off_t(const char *val) errno = 0; num = strtoimax(val, &expr, 0); - if (errno != 0) /* Overflow or underflow. */ - err(1, "%s", oper); - if (expr == val) /* No valid digits. */ - errx(1, "%s: illegal numeric value", oper); + errx(1, "%s: invalid numeric value", oper); + if (errno != 0) + err(1, "%s", oper); mult = postfix_to_mult(*expr); |