diff options
author | Oliver McFadden <oliver.mcfadden@nokia.com> | 2010-02-03 10:05:20 +0200 |
---|---|---|
committer | Keith Packard <keithp@keithp.com> | 2010-02-17 23:16:25 -0800 |
commit | 031f92bf9ab15226df410012a0d1c9c390efc36d (patch) | |
tree | 4b5df0cd13df71df78ed7a1ef800be918f9a286b | |
parent | be96fb2f02c13a6ee8aba40f7d4c3f9141f06cea (diff) |
parser: corrected xf86getBoolValue to use case insensitive compare
commit c6e8637e29e0ca11dfb35c02da7ca6002ac8c597 introduced this
regression; it can cause existing config files to be parsed incorrectly.
Acked-by: Julien Cristau <jcristau@debian.org>
Reviewed-by: Dan Nicholson <dbn.lists@gmail.com>
Signed-off-by: Oliver McFadden <oliver.mcfadden@nokia.com>
Signed-off-by: Keith Packard <keithp@keithp.com>
-rw-r--r-- | hw/xfree86/parser/scan.c | 16 |
1 files changed, 8 insertions, 8 deletions
diff --git a/hw/xfree86/parser/scan.c b/hw/xfree86/parser/scan.c index 03cbc8a44..cdca9ca1c 100644 --- a/hw/xfree86/parser/scan.c +++ b/hw/xfree86/parser/scan.c @@ -1207,21 +1207,21 @@ xf86getBoolValue(Bool *val, const char *str) if (*str == '\0') { *val = TRUE; } else { - if (strcmp(str, "1") == 0) + if (xf86nameCompare(str, "1") == 0) *val = TRUE; - else if (strcmp(str, "on") == 0) + else if (xf86nameCompare(str, "on") == 0) *val = TRUE; - else if (strcmp(str, "true") == 0) + else if (xf86nameCompare(str, "true") == 0) *val = TRUE; - else if (strcmp(str, "yes") == 0) + else if (xf86nameCompare(str, "yes") == 0) *val = TRUE; - else if (strcmp(str, "0") == 0) + else if (xf86nameCompare(str, "0") == 0) *val = FALSE; - else if (strcmp(str, "off") == 0) + else if (xf86nameCompare(str, "off") == 0) *val = FALSE; - else if (strcmp(str, "false") == 0) + else if (xf86nameCompare(str, "false") == 0) *val = FALSE; - else if (strcmp(str, "no") == 0) + else if (xf86nameCompare(str, "no") == 0) *val = FALSE; else return FALSE; |