[RFC] Define/use pad() instead of open coding it
Julien Cristau
jcristau at debian.org
Fri Mar 12 05:16:06 PST 2010
On Fri, Mar 12, 2010 at 01:01:52 -0500, Matt Turner wrote:
> diff --git a/hw/dmx/dmxpict.c b/hw/dmx/dmxpict.c
> index 072e3a6..a2b9484 100644
> --- a/hw/dmx/dmxpict.c
> +++ b/hw/dmx/dmxpict.c
> @@ -674,7 +674,7 @@ static int dmxProcRenderSetPictureFilter(ClientPtr client)
>
> if (pPictPriv->pict) {
> filter = (char *)(stuff + 1);
> - params = (XFixed *)(filter + ((stuff->nbytes + 3) & ~3));
> + params = (XFixed *)(filter + pad(stuff->nbytes, 4));
> nparams = ((XFixed *)stuff + client->req_len) - params;
>
pad_to_int32 maybe? or do you want to get rid of that one in favour of
your new pad? (also i guess a less generic name than pad would avoid
possible namespace conflict...)
Cheers,
Julien
More information about the xorg-devel
mailing list