From 5006597a1e440bde27b652bb1754f8ad8e4f39f8 Mon Sep 17 00:00:00 2001 From: Alan Coopersmith Date: Wed, 28 Sep 2011 21:43:40 -0700 Subject: Remove checks for NULL before XFree Replaced if (.*) \(XFree (.*);\) with \1 Signed-off-by: Alan Coopersmith --- xev.c | 22 +++++++++++----------- 1 file changed, 11 insertions(+), 11 deletions(-) diff --git a/xev.c b/xev.c index 13309df..0a4cb01 100644 --- a/xev.c +++ b/xev.c @@ -512,7 +512,7 @@ do_PropertyNotify (XEvent *eventp) printf (" atom 0x%lx (%s), time %lu, state %s\n", e->atom, aname ? aname : Unknown, e->time, s); - if (aname) XFree (aname); + XFree (aname); } static void @@ -524,7 +524,7 @@ do_SelectionClear (XEvent *eventp) printf (" selection 0x%lx (%s), time %lu\n", e->selection, sname ? sname : Unknown, e->time); - if (sname) XFree (sname); + XFree (sname); } static void @@ -541,9 +541,9 @@ do_SelectionRequest (XEvent *eventp) e->target, tname ? tname : Unknown, e->property, pname ? pname : Unknown, e->time); - if (sname) XFree (sname); - if (tname) XFree (tname); - if (pname) XFree (pname); + XFree (sname); + XFree (tname); + XFree (pname); } static void @@ -560,9 +560,9 @@ do_SelectionNotify (XEvent *eventp) printf (" property 0x%lx (%s), time %lu\n", e->property, pname ? pname : Unknown, e->time); - if (sname) XFree (sname); - if (tname) XFree (tname); - if (pname) XFree (pname); + XFree (sname); + XFree (tname); + XFree (pname); } static void @@ -592,14 +592,14 @@ do_ClientMessage (XEvent *eventp) char *message = XGetAtomName (dpy, e->data.l[0]); printf (" message_type 0x%lx (%s), format %d, message 0x%lx (%s)\n", e->message_type, mname ? mname : Unknown, e->format, e->data.l[0], message); - if (message) XFree (message); + XFree (message); } else { printf (" message_type 0x%lx (%s), format %d\n", e->message_type, mname ? mname : Unknown, e->format); } - if (mname) XFree (mname); + XFree (mname); if (e->format == 32 && e->message_type == wm_protocols @@ -786,7 +786,7 @@ do_RRNotify_OutputProperty (XEvent *eventp, else printf ("%d\n", e->state); XRRFreeOutputInfo (output_info); - if (property) XFree (property); + XFree (property); } static void -- cgit v1.2.3