From a43c50bb288ac587d6ba71649a114339b7f0d7a7 Mon Sep 17 00:00:00 2001 From: Ulrich Sibiller Date: Mon, 28 Oct 2019 16:04:03 +0100 Subject: Rootless.c: use designated initializers This fixes a possible unitialized struct variable. --- nx-X11/programs/Xserver/hw/nxagent/Rootless.c | 24 +++++++++--------------- 1 file changed, 9 insertions(+), 15 deletions(-) (limited to 'nx-X11') diff --git a/nx-X11/programs/Xserver/hw/nxagent/Rootless.c b/nx-X11/programs/Xserver/hw/nxagent/Rootless.c index 6908799b6..8baf97228 100644 --- a/nx-X11/programs/Xserver/hw/nxagent/Rootless.c +++ b/nx-X11/programs/Xserver/hw/nxagent/Rootless.c @@ -207,24 +207,18 @@ Window nxagentRootlessWMTopLevelWindow(WindowPtr pWin); void nxagentConfigureRootlessWindow(WindowPtr pWin, int x, int y, int w, int h, int bw, WindowPtr pSib, int stack_mode, Mask mask) { - XWindowChanges changes; - Window sibw = 0; - - changes.x = x; - changes.y = y; - changes.width = w; - changes.height = h; - changes.border_width = bw; - changes.stack_mode = stack_mode; + XWindowChanges changes = { + .x = x, + .y = y, + .width = w, + .height = h, + .border_width = bw, + .stack_mode = stack_mode + }; if (pSib) { - sibw = nxagentWindow(pSib); - } - - if (sibw) - { - changes.sibling = sibw; + changes.sibling = nxagentWindow(pSib); } XConfigureWindow(nxagentDisplay, nxagentWindow(pWin), mask, &changes); -- cgit v1.2.3