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 | 6a721e3af5e11bae1d59ca551a02470f35d9e844 (patch) | |
tree | b95dd0d69fca66321f010959e69c44f781452c1f /Xext/saver.c | |
parent | d792ac125a0462a04a930af543cbc732f8cdab7d (diff) |
Use C99 designated initializers in Xext 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 'Xext/saver.c')
-rw-r--r-- | Xext/saver.c | 24 |
1 files changed, 14 insertions, 10 deletions
diff --git a/Xext/saver.c b/Xext/saver.c index 60c02fffa..e1e86c0d4 100644 --- a/Xext/saver.c +++ b/Xext/saver.c @@ -634,14 +634,16 @@ ScreenSaverHandle(ScreenPtr pScreen, int xstate, Bool force) static int ProcScreenSaverQueryVersion(ClientPtr client) { - xScreenSaverQueryVersionReply rep; + xScreenSaverQueryVersionReply rep = { + .type = X_Reply, + .sequenceNumber = client->sequence, + .length = 0, + .majorVersion = SERVER_SAVER_MAJOR_VERSION, + .minorVersion = SERVER_SAVER_MINOR_VERSION + }; REQUEST_SIZE_MATCH(xScreenSaverQueryVersionReq); - rep.type = X_Reply; - rep.length = 0; - rep.sequenceNumber = client->sequence; - rep.majorVersion = SERVER_SAVER_MAJOR_VERSION; - rep.minorVersion = SERVER_SAVER_MINOR_VERSION; + if (client->swapped) { swaps(&rep.sequenceNumber); swapl(&rep.length); @@ -677,10 +679,12 @@ ProcScreenSaverQueryInfo(ClientPtr client) UpdateCurrentTime(); lastInput = GetTimeInMillis() - lastDeviceEventTime[XIAllDevices].milliseconds; - rep.type = X_Reply; - rep.length = 0; - rep.sequenceNumber = client->sequence; - rep.window = pSaver->wid; + rep = (xScreenSaverQueryInfoReply) { + .type = X_Reply, + .sequenceNumber = client->sequence, + .length = 0, + .window = pSaver->wid + }; if (screenIsSaved != SCREEN_SAVER_OFF) { rep.state = ScreenSaverOn; if (ScreenSaverTime) |