[PULL] bswap cleanup and misc patches
Keith Packard
keithp at keithp.com
Wed Sep 21 13:43:21 PDT 2011
On Fri, 2 Sep 2011 19:05:28 -0400, Matt Turner <mattst88 at gmail.com> wrote:
> Please pull from my tree. It contains four miscellaneous patches that
> were reviewed months ago and clean ups to the bswap macros.
Thanks for the nice cleanup work; this has been needed for twenty years
:-)
> Matt Turner (12):
> Use abs() on integers, not fabs()
> Remove unnecessary #undefs of [f]abs and old comments
> Replace Fabs() macro with fabs() function
> Silence printf format warnings in helper_exec.c
> Use internal temp variable for swap macros
> Use correct swap{l,s} (or none at all for CARD8)
> Cast char* buffers to swap functions
> Introduce swap_uint{16,32} functions, used in swap{l,s}
> Add type checking to swap macros
> Make lswap{l,s} inline functions
> Use lswap{l,s} in cpswap{l,s}
> Use __builtin_constant_p to determine if we can use lswapl
>
> Peter Harris (1):
> xkb: add missing swaps for xkbGetDeviceInfoReply
Looks like hw/dmx was missed in your testing? With this patch added, I
get a clean build. Could I get you to merge this in at the right place?
diff --git a/hw/dmx/dmx.c b/hw/dmx/dmx.c
index c05bd52..01a7448 100644
--- a/hw/dmx/dmx.c
+++ b/hw/dmx/dmx.c
@@ -653,10 +653,10 @@ static int ProcDMXGetDesktopAttributes(ClientPtr client)
if (client->swapped) {
swaps(&rep.sequenceNumber);
swapl(&rep.length);
- swapl(&rep.width);
- swapl(&rep.height);
- swapl(&rep.shiftX);
- swapl(&rep.shiftY);
+ swaps(&rep.width);
+ swaps(&rep.height);
+ swaps(&rep.shiftX);
+ swaps(&rep.shiftY);
}
WriteToClient(client, sizeof(xDMXGetDesktopAttributesReply), (char *)&rep);
return Success;
@@ -891,7 +891,7 @@ static int SProcDMXForceWindowCreation(ClientPtr client)
swaps(&stuff->length);
REQUEST_SIZE_MATCH(xDMXForceWindowCreationReq);
- swaps(&stuff->window);
+ swapl(&stuff->window);
return ProcDMXForceWindowCreation(client);
}
--
keith.packard at intel.com
-------------- next part --------------
A non-text attachment was scrubbed...
Name: not available
Type: application/pgp-signature
Size: 189 bytes
Desc: not available
URL: <http://lists.x.org/archives/xorg-devel/attachments/20110921/ad6f8e5f/attachment.pgp>
More information about the xorg-devel
mailing list