summaryrefslogtreecommitdiff
path: root/tarfs.c
diff options
context:
space:
mode:
authorCyril Roelandt <tipecaml@gmail.com>2013-07-08 11:04:34 +0200
committerSamuel Thibault <samuel.thibault@ens-lyon.org>2013-07-08 11:04:34 +0200
commit4d5114932950c5ac16e44cdb77cf0a175b4c1d64 (patch)
tree4cf4fd9bd56dce6df8b7836592fd21b0b83f4a91 /tarfs.c
parent7fc534e167e8ebf3e7267fca5db7e34c9bc15538 (diff)
Gracefully handle the errors using argp_error instead of error
* tarfs.c (tarfs_parse_opts): Gracefully handle the errors using argp_error instead of error.
Diffstat (limited to 'tarfs.c')
-rw-r--r--tarfs.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/tarfs.c b/tarfs.c
index 8ff1060f5..4a082643d 100644
--- a/tarfs.c
+++ b/tarfs.c
@@ -211,7 +211,7 @@ tarfs_parse_opts (int key, char *arg, struct argp_state *sate)
case ARGP_KEY_ARG:
tarfs_options.file_name = strdup (arg);
if (!tarfs_options.file_name || !strlen (tarfs_options.file_name))
- error (1, 1, "No archive specified.");
+ argp_error (sate, "No archive specified.");
}
return 0;