mirror of
https://github.com/X11Libre/xserver.git
synced 2026-03-24 03:44:06 +00:00
glx: assign at declaration
Assigning structs at declaration is quicker to read/understand. No need to support ancient compilers that couldn't do that, anymore. Signed-off-by: Enrico Weigelt, metux IT consult <info@metux.net> Part-of: <https://gitlab.freedesktop.org/xorg/xserver/-/merge_requests/1665>
This commit is contained in:
committed by
Marge Bot
parent
161c3c8398
commit
558ded4dbf
@@ -112,7 +112,6 @@ __glXDispSwap_RenderMode(__GLXclientState * cl, GLbyte * pc)
|
||||
{
|
||||
ClientPtr client = cl->client;
|
||||
__GLXcontext *cx;
|
||||
xGLXRenderModeReply reply;
|
||||
GLint nitems = 0, retBytes = 0, retval, newModeCheck;
|
||||
GLubyte *retBuffer = NULL;
|
||||
GLenum newMode;
|
||||
@@ -203,7 +202,7 @@ __glXDispSwap_RenderMode(__GLXclientState * cl, GLbyte * pc)
|
||||
** selection array, as per the API for glRenderMode itself.
|
||||
*/
|
||||
noChangeAllowed:;
|
||||
reply = (xGLXRenderModeReply) {
|
||||
xGLXRenderModeReply reply = {
|
||||
.type = X_Reply,
|
||||
.sequenceNumber = client->sequence,
|
||||
.length = nitems,
|
||||
@@ -250,7 +249,6 @@ __glXDispSwap_Finish(__GLXclientState * cl, GLbyte * pc)
|
||||
ClientPtr client = cl->client;
|
||||
__GLXcontext *cx;
|
||||
int error;
|
||||
xGLXSingleReply reply = { 0, };
|
||||
|
||||
__GLX_DECLARE_SWAP_VARIABLES;
|
||||
|
||||
@@ -266,6 +264,7 @@ __glXDispSwap_Finish(__GLXclientState * cl, GLbyte * pc)
|
||||
glFinish();
|
||||
|
||||
/* Send empty reply packet to indicate finish is finished */
|
||||
xGLXSingleReply reply = { 0 };
|
||||
__GLX_BEGIN_REPLY(0);
|
||||
__GLX_PUT_RETVAL(0);
|
||||
__GLX_SWAP_REPLY_HEADER();
|
||||
|
||||
Reference in New Issue
Block a user