From ad4092cf7d59a89b1b2922440eef65be5c0c5ebd Mon Sep 17 00:00:00 2001 From: Alan Coopersmith Date: Mon, 9 Jul 2012 19:12:44 -0700 Subject: Replace padlength tables with inline functions from misc.h Adds new function padding_for_int32() and uses existing pad_to_int32() depending on required results. Signed-off-by: Alan Coopersmith Reviewed-by: Keith Packard Reviewed-by: Peter Hutterer Tested-by: Daniel Stone --- randr/rrscreen.c | 5 +---- 1 file changed, 1 insertion(+), 4 deletions(-) (limited to 'randr') diff --git a/randr/rrscreen.c b/randr/rrscreen.c index a42772512..6a7a08939 100644 --- a/randr/rrscreen.c +++ b/randr/rrscreen.c @@ -22,8 +22,6 @@ #include "randrstr.h" -static const int padlength[4] = { 0, 3, 2, 1 }; - static CARD16 RR10CurrentSizeID(ScreenPtr pScreen); @@ -46,8 +44,7 @@ RREditConnectionInfo(ScreenPtr pScreen) connSetup = (xConnSetup *) ConnectionInfo; vendor = (char *) connSetup + sizeof(xConnSetup); formats = (xPixmapFormat *) ((char *) vendor + - connSetup->nbytesVendor + - padlength[connSetup->nbytesVendor & 3]); + pad_to_int32(connSetup->nbytesVendor)); root = (xWindowRoot *) ((char *) formats + sizeof(xPixmapFormat) * screenInfo.numPixmapFormats); -- cgit v1.2.3