summaryrefslogtreecommitdiff
path: root/parse-options.c
diff options
context:
space:
mode:
Diffstat (limited to 'parse-options.c')
-rw-r--r--parse-options.c7
1 files changed, 3 insertions, 4 deletions
diff --git a/parse-options.c b/parse-options.c
index 60fae3a..a0cef40 100644
--- a/parse-options.c
+++ b/parse-options.c
@@ -357,8 +357,7 @@ is_abbreviated:
}
/* negated? */
if (!starts_with(arg, "no-")) {
- if (starts_with(long_name, "no-")) {
- long_name += 3;
+ if (skip_prefix(long_name, "no-", &long_name)) {
opt_flags |= OPT_UNSET;
goto again;
}
@@ -420,7 +419,7 @@ static void check_typos(const char *arg, const struct option *options)
return;
if (starts_with(arg, "no-")) {
- error(_("did you mean `--%s` (with two dashes ?)"), arg);
+ error(_("did you mean `--%s` (with two dashes)?"), arg);
exit(129);
}
@@ -428,7 +427,7 @@ static void check_typos(const char *arg, const struct option *options)
if (!options->long_name)
continue;
if (starts_with(options->long_name, arg)) {
- error(_("did you mean `--%s` (with two dashes ?)"), arg);
+ error(_("did you mean `--%s` (with two dashes)?"), arg);
exit(129);
}
}