From cc5f09c86f7bea23b7546c3491b2c52ce8100a71 Mon Sep 17 00:00:00 2001 From: Alan Coopersmith Date: Mon, 9 Jul 2012 19:12:43 -0700 Subject: Use C99 designated initializers in various extension Replies Signed-off-by: Alan Coopersmith Reviewed-by: Keith Packard Tested-by: Daniel Stone --- composite/compext.c | 29 +++++++++++++++++------------ 1 file changed, 17 insertions(+), 12 deletions(-) (limited to 'composite') diff --git a/composite/compext.c b/composite/compext.c index be25b2779..eea1a5861 100644 --- a/composite/compext.c +++ b/composite/compext.c @@ -107,14 +107,15 @@ static int ProcCompositeQueryVersion(ClientPtr client) { CompositeClientPtr pCompositeClient = GetCompositeClient(client); - xCompositeQueryVersionReply rep; + xCompositeQueryVersionReply rep = { + .type = X_Reply, + .sequenceNumber = client->sequence, + .length = 0 + }; REQUEST(xCompositeQueryVersionReq); REQUEST_SIZE_MATCH(xCompositeQueryVersionReq); - rep.type = X_Reply; - rep.length = 0; - rep.sequenceNumber = client->sequence; if (stuff->majorVersion < SERVER_COMPOSITE_MAJOR_VERSION) { rep.majorVersion = stuff->majorVersion; rep.minorVersion = stuff->minorVersion; @@ -311,10 +312,12 @@ ProcCompositeGetOverlayWindow(ClientPtr client) return rc; } - rep.type = X_Reply; - rep.sequenceNumber = client->sequence; - rep.length = 0; - rep.overlayWin = cs->pOverlayWin->drawable.id; + rep = (xCompositeGetOverlayWindowReply) { + .type = X_Reply, + .sequenceNumber = client->sequence, + .length = 0, + .overlayWin = cs->pOverlayWin->drawable.id + }; if (client->swapped) { swaps(&rep.sequenceNumber); @@ -842,10 +845,12 @@ PanoramiXCompositeGetOverlayWindow(ClientPtr client) cs = GetCompScreen(screenInfo.screens[0]); - rep.type = X_Reply; - rep.sequenceNumber = client->sequence; - rep.length = 0; - rep.overlayWin = cs->pOverlayWin->drawable.id; + rep = (xCompositeGetOverlayWindowReply) { + .type = X_Reply, + .sequenceNumber = client->sequence, + .length = 0, + .overlayWin = cs->pOverlayWin->drawable.id + }; if (client->swapped) { swaps(&rep.sequenceNumber); -- cgit v1.2.3