summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--cmds-receive.c6
-rw-r--r--cmds-send.c7
2 files changed, 4 insertions, 9 deletions
diff --git a/cmds-receive.c b/cmds-receive.c
index 2d55c539..d6cd3da4 100644
--- a/cmds-receive.c
+++ b/cmds-receive.c
@@ -951,10 +951,8 @@ int cmd_receive(int argc, char **argv)
}
}
- if (optind + 1 != argc) {
- fprintf(stderr, "ERROR: receive needs path to subvolume\n");
- return 1;
- }
+ if (check_argc_exact(argc - optind, 1))
+ usage(cmd_receive_usage);
tomnt = argv[optind];
diff --git a/cmds-send.c b/cmds-send.c
index 9d49ce9f..dcb66076 100644
--- a/cmds-send.c
+++ b/cmds-send.c
@@ -524,11 +524,8 @@ int cmd_send(int argc, char **argv)
}
}
- if (optind == argc) {
- fprintf(stderr, "ERROR: send needs path to snapshot\n");
- ret = 1;
- goto out;
- }
+ if (optind == argc)
+ usage(cmd_send_usage);
if (outname != NULL) {
send.dump_fd = creat(outname, 0600);