mirror of
https://gitlab.freedesktop.org/xorg/xserver.git
synced 2026-04-28 05:20:39 +02:00
parser: corrected xf86getBoolValue to use case insensitive compare
commit c6e8637e29 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>
This commit is contained in:
parent
be96fb2f02
commit
031f92bf9a
1 changed files with 8 additions and 8 deletions
|
|
@ -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;
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue