1
0
mirror of https://github.com/gryf/wmaker.git synced 2025-12-20 12:58:08 +01:00

wmaker: check return value for XGetWindowAttributes (Coverity #50032)

As reported by Coverity, the return value for XGetWindowAttributes is
usually checked in many places, because it is a good practice to ensure
that it did work, but it was not checked when called in the function
'wClientCheckProperty'.

Signed-off-by: Christophe CURIS <christophe.curis@free.fr>
This commit is contained in:
Christophe CURIS
2015-04-25 12:44:20 +02:00
committed by Carlos R. Mafra
parent 2086eefb7e
commit 8d09af51b8

View File

@@ -483,7 +483,7 @@ void wClientCheckProperty(WWindow * wwin, XPropertyEvent * event)
int foo; int foo;
unsigned bar; unsigned bar;
XGetWindowAttributes(dpy, wwin->client_win, &attribs); if (XGetWindowAttributes(dpy, wwin->client_win, &attribs) != 0)
wClientGetNormalHints(wwin, &attribs, False, &foo, &foo, &bar, &bar); wClientGetNormalHints(wwin, &attribs, False, &foo, &foo, &bar, &bar);
/* TODO: should we check for consistency of the current /* TODO: should we check for consistency of the current
* size against the new geometry hints? */ * size against the new geometry hints? */