From 7d8f084fbffd869415bc49dc0f29f60c53c9260d Mon Sep 17 00:00:00 2001 From: "Enrico Weigelt, metux IT consult" Date: Thu, 18 Jul 2024 18:37:08 +0200 Subject: [PATCH] dri: use static struct init on declaration & drop useless assignments Make the code a bit easier to read by using initialization of the reply structs, at the point of declaration. Most of them aren't written to later, just passed into WriteReplyToClient(). Also dropping some useless zero assignments (struct initializers automatically zero-out unmentioned fields). Signed-off-by: Enrico Weigelt, metux IT consult --- hw/xfree86/dri/xf86dri.c | 4 ---- 1 file changed, 4 deletions(-) diff --git a/hw/xfree86/dri/xf86dri.c b/hw/xfree86/dri/xf86dri.c index 0fcc4137b..7520e7378 100644 --- a/hw/xfree86/dri/xf86dri.c +++ b/hw/xfree86/dri/xf86dri.c @@ -158,8 +158,6 @@ ProcXF86DRIOpenConnection(register ClientPtr client) .hSAREALow = (CARD32) (hSAREA & 0xffffffff), #if defined(LONG64) && !defined(__linux__) .hSAREAHigh = (CARD32) (hSAREA >> 32), -#else - .hSAREAHigh = 0 #endif }; @@ -449,8 +447,6 @@ ProcXF86DRIGetDeviceInfo(register ClientPtr client) rep.hFrameBufferLow = (CARD32) (hFrameBuffer & 0xffffffff); #if defined(LONG64) && !defined(__linux__) rep.hFrameBufferHigh = (CARD32) (hFrameBuffer >> 32); -#else - rep.hFrameBufferHigh = 0; #endif x_rpcbuf_t rpcbuf = { .swapped = client->swapped, .err_clear = TRUE };