diff options
author | okan | 2015-08-27 18:42:56 +0000 |
---|---|---|
committer | okan | 2015-08-27 18:42:56 +0000 |
commit | f29c717f7e0d4e9065f819e0ec7c7517cefdf69d (patch) | |
tree | 5f49aa3bdf18f32378256a284d8312166defa059 /xevents.c | |
parent | 0a6b4395b1446658387e705bb2409d657dd039d6 (diff) | |
download | cwm-f29c717f7e0d4e9065f819e0ec7c7517cefdf69d.tar.gz |
Add consistent checks against NULL.
Diffstat (limited to '')
-rw-r--r-- | xevents.c | 8 |
1 files changed, 4 insertions, 4 deletions
@@ -15,7 +15,7 @@ * ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING OUT OF * OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE. * - * $OpenBSD: xevents.c,v 1.118 2015/07/01 14:36:42 okan Exp $ + * $OpenBSD: xevents.c,v 1.119 2015/08/27 18:42:56 okan Exp $ */ /* @@ -77,7 +77,7 @@ xev_handle_maprequest(XEvent *ee) XMapRequestEvent *e = &ee->xmaprequest; struct client_ctx *cc = NULL, *old_cc; - if ((old_cc = client_current())) + if ((old_cc = client_current()) != NULL) client_ptrsave(old_cc); if ((cc = client_find(e->window)) == NULL) @@ -252,7 +252,7 @@ xev_handle_buttonrelease(XEvent *ee) { struct client_ctx *cc; - if ((cc = client_current())) + if ((cc = client_current()) != NULL) group_toggle_membership_leave(cc); } @@ -339,7 +339,7 @@ xev_handle_clientmessage(XEvent *ee) } } else if (e->message_type == ewmh[_NET_ACTIVE_WINDOW]) { if ((cc = client_find(e->window)) != NULL) { - if ((old_cc = client_current())) + if ((old_cc = client_current()) != NULL) client_ptrsave(old_cc); client_ptrwarp(cc); } |