summaryrefslogtreecommitdiff
path: root/tools/common.c
diff options
context:
space:
mode:
Diffstat (limited to 'tools/common.c')
-rw-r--r--tools/common.c7
1 files changed, 3 insertions, 4 deletions
diff --git a/tools/common.c b/tools/common.c
index 642da38..0772738 100644
--- a/tools/common.c
+++ b/tools/common.c
@@ -374,9 +374,7 @@ poptContext process_options(int argc, const char **argv,
{
int c;
poptContext opts = poptGetContext(NULL, argc, argv, options, 0);
-
- if (!help)
- poptSetOtherOptionHelp(opts, "[OPTIONS]... <command> <args>");
+ poptSetOtherOptionHelp(opts, help);
while ((c = poptGetNextOpt(opts)) >= 0) {
// no options require explicit handling
@@ -396,7 +394,8 @@ poptContext process_options(int argc, const char **argv,
void process_all_options(int argc, const char **argv,
struct poptOption *options)
{
- poptContext opts = process_options(argc, argv, options, NULL);
+ poptContext opts = process_options(argc, argv, options,
+ "[OPTIONS]...");
const char *opt = poptPeekArg(opts);
if (opt) {