summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--hw/xfree86/parser/scan.c10
1 files changed, 2 insertions, 8 deletions
diff --git a/hw/xfree86/parser/scan.c b/hw/xfree86/parser/scan.c
index 5c2e4ae74..81a454b23 100644
--- a/hw/xfree86/parser/scan.c
+++ b/hw/xfree86/parser/scan.c
@@ -441,14 +441,8 @@ xf86getToken(const xf86ConfigSymTabRec * tab)
/*
* Joop, at last we have to lookup the token ...
*/
- if (tab) {
- i = 0;
- while (tab[i].token != -1)
- if (xf86nameCompare(configRBuf, tab[i].name) == 0)
- return tab[i].token;
- else
- i++;
- }
+ if (tab)
+ return StringToToken(configRBuf, tab);
return ERROR_TOKEN; /* Error catcher */
}