summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorEgbert Eich <eich@freedesktop.org>2011-05-25 13:35:21 +0200
committerEgbert Eich <eich@freedesktop.org>2013-08-14 15:06:43 +0200
commitad0864d4fae1db24d32e95abff8a37d7eebea7ef (patch)
tree29fa3886167f10f0baf969b11e3b48be8c591a66
parent29a149544e2120a582043738d5b09dd80e896345 (diff)
Make bool option parsing clearer and more consistent
When there's no need to know whether the user has set the value of a configurable option (for logging for instance) the return of xf86ReturnOptValBool() can be assigned directly. Signed-off-by: Egbert Eich <eich@freedesktop.org> Reviewed-by: Chris Wilson <chris@chris-wilson.co.uk>
-rw-r--r--src/vesa.c11
1 files changed, 5 insertions, 6 deletions
diff --git a/src/vesa.c b/src/vesa.c
index b73d104..9e3a112 100644
--- a/src/vesa.c
+++ b/src/vesa.c
@@ -838,16 +838,15 @@ VESAPreInit(ScrnInfoPtr pScrn, int flags)
xf86ProcessOptions(pScrn->scrnIndex, pScrn->options, pVesa->Options);
/* Use shadow by default */
- if (xf86ReturnOptValBool(pVesa->Options, OPTION_SHADOW_FB, TRUE))
- pVesa->shadowFB = TRUE;
+ pVesa->shadowFB = xf86ReturnOptValBool(pVesa->Options, OPTION_SHADOW_FB,
+ TRUE);
if (xf86ReturnOptValBool(pVesa->Options, OPTION_DFLT_REFRESH, FALSE))
pVesa->defaultRefresh = TRUE;
- pVesa->ModeSetClearScreen = FALSE;
- if (xf86ReturnOptValBool(pVesa->Options, OPTION_MODESET_CLEAR_SCREEN,
- FALSE))
- pVesa->ModeSetClearScreen = TRUE;
+ pVesa->ModeSetClearScreen =
+ xf86ReturnOptValBool(pVesa->Options,
+ OPTION_MODESET_CLEAR_SCREEN, FALSE);
if (!pVesa->defaultRefresh && !pVesa->strict_validation)
VBESetModeParameters(pScrn, pVesa->pVbe);