aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorUlrich Sibiller <uli42@gmx.de>2019-10-28 16:04:03 +0100
committerMike Gabriel <mike.gabriel@das-netzwerkteam.de>2019-11-15 12:17:19 +0100
commita43c50bb288ac587d6ba71649a114339b7f0d7a7 (patch)
treee68d6712f97c7ca3e4d1711dd30ec8ea4ba5fbc6
parent1664e1051faed62cd1e8d4e6b6feec6bf1be7b49 (diff)
downloadnx-libs-a43c50bb288ac587d6ba71649a114339b7f0d7a7.tar.gz
nx-libs-a43c50bb288ac587d6ba71649a114339b7f0d7a7.tar.bz2
nx-libs-a43c50bb288ac587d6ba71649a114339b7f0d7a7.zip
Rootless.c: use designated initializers
This fixes a possible unitialized struct variable.
-rw-r--r--nx-X11/programs/Xserver/hw/nxagent/Rootless.c24
1 files changed, 9 insertions, 15 deletions
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);