From 3567e59e200e6fc926cc54a28db2f07e62c92f4f Mon Sep 17 00:00:00 2001 From: bakkeby Date: Mon, 27 Jan 2020 09:13:13 +0100 Subject: [PATCH] [dwm][PATCH] remove NULL guards for XFree --- dwm.c | 9 +++------ 1 file changed, 3 insertions(+), 6 deletions(-) diff --git a/dwm.c b/dwm.c index f82a8b1..aed2943 100644 --- a/dwm.c +++ b/dwm.c @@ -547,10 +547,8 @@ applyrules(Client *c) #endif // SWITCHTAG_PATCH } } - if (ch.res_class) - XFree(ch.res_class); - if (ch.res_name) - XFree(ch.res_name); + XFree(ch.res_class); + XFree(ch.res_name); #if EMPTYVIEW_PATCH if(c->tags & TAGMASK) c->tags = c->tags & TAGMASK; else if(c->mon->tagset[c->mon->seltags]) c->tags = c->mon->tagset[c->mon->seltags]; @@ -2596,8 +2594,7 @@ scan(void) && (wa.map_state == IsViewable || getstate(wins[i]) == IconicState)) manage(wins[i], &wa); } - if (wins) - XFree(wins); + XFree(wins); } }