diff options
author | Alan Coopersmith <alan.coopersmith@oracle.com> | 2012-07-09 19:12:43 -0700 |
---|---|---|
committer | Alan Coopersmith <alan.coopersmith@oracle.com> | 2012-07-09 19:58:30 -0700 |
commit | cc5f09c86f7bea23b7546c3491b2c52ce8100a71 (patch) | |
tree | 823cbe0c7406ff270500b9e332268f5780a26650 /record | |
parent | 2f5caeaddb3616dc9ff57d784f7feba589c536e7 (diff) |
Use C99 designated initializers in various extension Replies
Signed-off-by: Alan Coopersmith <alan.coopersmith@oracle.com>
Reviewed-by: Keith Packard <keithp@keithp.com>
Tested-by: Daniel Stone <daniel@fooishbar.org>
Diffstat (limited to 'record')
-rw-r--r-- | record/record.c | 27 |
1 files changed, 15 insertions, 12 deletions
diff --git a/record/record.c b/record/record.c index 54a0e68dd..67569d90c 100644 --- a/record/record.c +++ b/record/record.c @@ -1816,14 +1816,15 @@ static int ProcRecordQueryVersion(ClientPtr client) { /* REQUEST(xRecordQueryVersionReq); */ - xRecordQueryVersionReply rep; + xRecordQueryVersionReply rep = { + .type = X_Reply, + .sequenceNumber = client->sequence, + .length = 0, + .majorVersion = SERVER_RECORD_MAJOR_VERSION, + .minorVersion = SERVER_RECORD_MINOR_VERSION + }; REQUEST_SIZE_MATCH(xRecordQueryVersionReq); - rep.type = X_Reply; - rep.sequenceNumber = client->sequence; - rep.length = 0; - rep.majorVersion = SERVER_RECORD_MAJOR_VERSION; - rep.minorVersion = SERVER_RECORD_MINOR_VERSION; if (client->swapped) { swaps(&rep.sequenceNumber); swaps(&rep.majorVersion); @@ -2231,12 +2232,14 @@ ProcRecordGetContext(ClientPtr client) /* write the reply header */ - rep.type = X_Reply; - rep.sequenceNumber = client->sequence; - rep.length = length; - rep.enabled = pContext->pRecordingClient != NULL; - rep.elementHeader = pContext->elemHeaders; - rep.nClients = nClients; + rep = (xRecordGetContextReply) { + .type = X_Reply, + .enabled = pContext->pRecordingClient != NULL, + .sequenceNumber = client->sequence, + .length = length, + .elementHeader = pContext->elemHeaders, + .nClients = nClients + }; if (client->swapped) { swaps(&rep.sequenceNumber); swapl(&rep.length); |