mirror of
https://github.com/gryf/wmaker.git
synced 2025-12-20 04:48:06 +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:
committed by
Carlos R. Mafra
parent
2086eefb7e
commit
8d09af51b8
@@ -483,8 +483,8 @@ void wClientCheckProperty(WWindow * wwin, XPropertyEvent * event)
|
||||
int foo;
|
||||
unsigned bar;
|
||||
|
||||
XGetWindowAttributes(dpy, wwin->client_win, &attribs);
|
||||
wClientGetNormalHints(wwin, &attribs, False, &foo, &foo, &bar, &bar);
|
||||
if (XGetWindowAttributes(dpy, wwin->client_win, &attribs) != 0)
|
||||
wClientGetNormalHints(wwin, &attribs, False, &foo, &foo, &bar, &bar);
|
||||
/* TODO: should we check for consistency of the current
|
||||
* size against the new geometry hints? */
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user