summaryrefslogtreecommitdiff
path: root/apps/lib/opt.c
diff options
context:
space:
mode:
authorDr. David von Oheimb <David.von.Oheimb@siemens.com>2020-05-26 10:44:10 +0200
committerDr. David von Oheimb <David.von.Oheimb@siemens.com>2020-06-13 15:13:21 +0200
commit2620c38ba8f9bd4ceffd124e12e2a630621abe27 (patch)
treeaf186fc48a75cd6ffd730847dbe36d3f42ae6530 /apps/lib/opt.c
parent50e09788d54c5b700c39a53725c3d51b21cf536e (diff)
downloadopenssl-new-2620c38ba8f9bd4ceffd124e12e2a630621abe27.tar.gz
Remove meanwhile redundant error output of apps/opt_next(void) parsing numbers
Reviewed-by: Matt Caswell <matt@openssl.org> (Merged from https://github.com/openssl/openssl/pull/11998)
Diffstat (limited to 'apps/lib/opt.c')
-rw-r--r--apps/lib/opt.c25
1 files changed, 7 insertions, 18 deletions
diff --git a/apps/lib/opt.c b/apps/lib/opt.c
index 566de8ab7d..7630d516ca 100644
--- a/apps/lib/opt.c
+++ b/apps/lib/opt.c
@@ -740,40 +740,29 @@ int opt_next(void)
break;
case 'p':
case 'n':
- if (!opt_int(arg, &ival)
- || (o->valtype == 'p' && ival <= 0)) {
+ if (!opt_int(arg, &ival))
+ return -1;
+ if (o->valtype == 'p' && ival <= 0) {
opt_printf_stderr("%s: Non-positive number \"%s\" for -%s\n",
prog, arg, o->name);
return -1;
}
break;
case 'M':
- if (!opt_imax(arg, &imval)) {
- opt_printf_stderr("%s: Invalid number \"%s\" for -%s\n",
- prog, arg, o->name);
+ if (!opt_imax(arg, &imval))
return -1;
- }
break;
case 'U':
- if (!opt_umax(arg, &umval)) {
- opt_printf_stderr("%s: Invalid number \"%s\" for -%s\n",
- prog, arg, o->name);
+ if (!opt_umax(arg, &umval))
return -1;
- }
break;
case 'l':
- if (!opt_long(arg, &lval)) {
- opt_printf_stderr("%s: Invalid number \"%s\" for -%s\n",
- prog, arg, o->name);
+ if (!opt_long(arg, &lval))
return -1;
- }
break;
case 'u':
- if (!opt_ulong(arg, &ulval)) {
- opt_printf_stderr("%s: Invalid number \"%s\" for -%s\n",
- prog, arg, o->name);
+ if (!opt_ulong(arg, &ulval))
return -1;
- }
break;
case 'c':
case 'E':