Skip to content

Fix a build error with Xorg master

Use xf86ReturnOptValBool() in get_bool_option() instead of options[option_index].value.bool to fix a compiler error with current Xorg xserver master branch.

Also use xf86GetOptValInteger() in get_int_option() and xf86GetOptValString() in get_str_option() for consistency.

The change causes a slight performance drop during option parsing because the passed-in index_value is no longer used as an index into the options array.

Instead, it's used as a token now for the standard option getter functions which works since the index_value to the get_*_option() functions are identical to the value of options[n].token in the passed-in OptionInfoRec array.

Also rename "int option_index" to "int token" for clarity in all three functions.

Signed-off-by: Zoltán Böszörményi zboszor@gmail.com

Merge request reports