diff options
Diffstat (limited to 'driver/xf86-video-geode/src/lx_display.c')
-rw-r--r-- | driver/xf86-video-geode/src/lx_display.c | 5 |
1 files changed, 3 insertions, 2 deletions
diff --git a/driver/xf86-video-geode/src/lx_display.c b/driver/xf86-video-geode/src/lx_display.c index ca6fed156..b46fa1700 100644 --- a/driver/xf86-video-geode/src/lx_display.c +++ b/driver/xf86-video-geode/src/lx_display.c @@ -354,10 +354,11 @@ lx_crtc_gamma_set(xf86CrtcPtr crtc, CARD16 * red, CARD16 * green, */ for (i = 0; i < 256; i++) { + unsigned int val; (*red) &= 0xff00; (*green) &= 0xff00; (*blue) &= 0xff00; - unsigned int val = (*(red++) << 8) | *(green++) | (*(blue++) >> 8); + val = (*(red++) << 8) | *(green++) | (*(blue++) >> 8); df_set_video_palette_entry(i, val); } @@ -577,7 +578,7 @@ LXSetupCrtc(ScrnInfoPtr pScrni) return; } - lxpriv = xnfcalloc(sizeof(LXCrtcPrivateRec), 1); + lxpriv = xnfcalloc(1, sizeof(LXCrtcPrivateRec)); if (!lxpriv) { xf86CrtcDestroy(crtc); |