aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--pass.c8
1 files changed, 4 insertions, 4 deletions
diff --git a/pass.c b/pass.c
index 513c9aa..91a4817 100644
--- a/pass.c
+++ b/pass.c
@@ -103,22 +103,22 @@ int main(int argc, char *argv[])
if (!strcmp("help", *argv)) {
print_usage();
} else if (!strcmp("init", *argv)) {
- if (!argv[1])
+ if (argc != 2)
err_die(1, "invalid usage, try pass help");
r = pass_init(argv[1]);
} else if (!strcmp("cat", *argv)) {
- if (!argv[1])
+ if (argc != 2)
err_die(1, "invalid usage, try pass help");
r = cat(argv[1]);
} else if (!strcmp("add", *argv)) {
- if (!argv[1])
+ if (argc != 2)
err_die(1, "invalid usage, try pass help");
r = add(argv[1]);
} else if (!strcmp("rm", *argv)) {
- if (!argv[1])
+ if (argc != 2)
err_die(1, "invalid usage, try pass help");
r = pass_rm(argv[1]);