aboutsummaryrefslogtreecommitdiff
path: root/utils/uri/uri.c
diff options
context:
space:
mode:
Diffstat (limited to 'utils/uri/uri.c')
-rw-r--r--utils/uri/uri.c7
1 files changed, 6 insertions, 1 deletions
diff --git a/utils/uri/uri.c b/utils/uri/uri.c
index 3a8a9fbb..daef8da3 100644
--- a/utils/uri/uri.c
+++ b/utils/uri/uri.c
@@ -159,11 +159,16 @@ int main(int argc, char *argv[])
format = c;
break;
default:
- fprintf(stderr, "usage: %s [-p | -d] cert [cert...]\n", argv[0]);
ret = 1;
}
}
+ if (argc == optind)
+ ret = 1;
+
+ if (ret != 0)
+ fprintf(stderr, "usage: %s [-p | -d] cert [cert...]\n", argv[0]);
+
if (ret == 0) {
argc -= optind;
argv += optind;