diff options
author | Roy Marples <roy@marples.name> | 2007-09-26 07:52:48 +0000 |
---|---|---|
committer | Roy Marples <roy@marples.name> | 2007-09-26 07:52:48 +0000 |
commit | ef0df587614fc98b35d882c793d515d6a7bbfcb2 (patch) | |
tree | cd85adc4a351131b2ea08baad146143cde7ad4fe /src | |
parent | e24d808fc50cba4f6da3ead3936e7960f38f60a3 (diff) |
Fix rc_env_bool
Diffstat (limited to 'src')
-rw-r--r-- | src/_usage.h | 2 | ||||
-rw-r--r-- | src/librc-misc.c | 16 |
2 files changed, 9 insertions, 9 deletions
diff --git a/src/_usage.h b/src/_usage.h index cff60df5..f75da52e 100644 --- a/src/_usage.h +++ b/src/_usage.h @@ -7,7 +7,7 @@ * Released under the GPLv2 */ -#define getoptstring_COMMON "Chq" +#define getoptstring_COMMON "Chqv" #define longopts_COMMON \ { "help", 0, NULL, 'h'}, \ diff --git a/src/librc-misc.c b/src/librc-misc.c index f2ecd165..ad144395 100644 --- a/src/librc-misc.c +++ b/src/librc-misc.c @@ -69,16 +69,16 @@ bool rc_env_bool (const char *var) return (false); } - if (strcasecmp (var, "true") == 0 || - strcasecmp (var, "y") == 0 || - strcasecmp (var, "yes") == 0 || - strcasecmp (var, "1") == 0) + if (strcasecmp (v, "true") == 0 || + strcasecmp (v, "y") == 0 || + strcasecmp (v, "yes") == 0 || + strcasecmp (v, "1") == 0) return (true); - if (strcasecmp (var, "false") != 0 && - strcasecmp (var, "n") != 0 && - strcasecmp (var, "no") != 0 && - strcasecmp (var, "0") != 0) + if (strcasecmp (v, "false") != 0 && + strcasecmp (v, "n") != 0 && + strcasecmp (v, "no") != 0 && + strcasecmp (v, "0") != 0) errno = EINVAL; return (false); |