xfree86/parser: reuse StringToToken() in xf86getToken()
Reviewed-by: Alex Deucher <alexander.deucher@amd.com> Signed-off-by: Emil Velikov <emil.l.velikov@gmail.com>
This commit is contained in:
parent
944ea03d5b
commit
537276a5b8
|
@ -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 */
|
||||
}
|
||||
|
|
Loading…
Reference in New Issue