1
0
mirror of https://github.com/gryf/wmaker.git synced 2025-12-21 05:18:06 +01:00

wmaker: remove unnecessary null pointer checks in handle_event of wsmap

The function is called only if wsmap is not null, and the function is not
modifying its value so it won't become null. Removed the checks to keep the
code as simple as possible for maintainability.

Signed-off-by: Christophe CURIS <christophe.curis@free.fr>
This commit is contained in:
Christophe CURIS
2014-12-07 17:10:16 +01:00
committed by Carlos R. Mafra
parent ad84a2dc8f
commit 4bed8d14d7

View File

@@ -487,8 +487,6 @@ static void handle_event(WWorkspaceMap *wsmap, W_WorkspaceMap *wsmap_array)
WMMaskEvent(dpy, KeyPressMask | KeyReleaseMask | ExposureMask
| PointerMotionMask | ButtonPressMask | ButtonReleaseMask | EnterWindowMask, &ev);
if (!wsmap)
break;
modifiers = ev.xkey.state & w_global.shortcut.modifiers_mask;
switch (ev.type) {
@@ -539,8 +537,7 @@ static void handle_event(WWorkspaceMap *wsmap, W_WorkspaceMap *wsmap_array)
XUngrabPointer(dpy, CurrentTime);
XUngrabKeyboard(dpy, CurrentTime);
if (wsmap)
workspace_map_destroy(wsmap);
workspace_map_destroy(wsmap);
}
static WWorkspaceMap *init_workspace_map(WScreen *scr, W_WorkspaceMap *wsmap_array)