diff --git a/src/barwin.c b/src/barwin.c index 069a3d8..940b9d5 100644 --- a/src/barwin.c +++ b/src/barwin.c @@ -98,7 +98,7 @@ barwin_delete(BarWindow *bw) XSelectInput(dpy, bw->win, NoEventMask); XDestroyWindow(dpy, bw->win); XFreePixmap(dpy, bw->dr); - efree(bw); + free(bw); return; } diff --git a/src/client.c b/src/client.c index 1943201..1332a5a 100644 --- a/src/client.c +++ b/src/client.c @@ -375,7 +375,7 @@ client_manage(Window w, XWindowAttributes *wa) for(t = clients; t && t->win != trans; t = t->next); if(t) c->tag = t->tag; if(!c->free) c->free = (rettrans == Success) || c->hint; - efree(t); + free(t); client_attach(c); client_map(c); @@ -603,7 +603,7 @@ client_unmanage(Client *c) XUngrabServer(dpy); arrange(); XFree(c->title); - efree(c); + free(c); return; } diff --git a/src/screen.c b/src/screen.c index 3daf36c..4c82f1b 100644 --- a/src/screen.c +++ b/src/screen.c @@ -70,7 +70,7 @@ screen_get_geo(int s) geo.height = xsi[s].height - INFOBARH - TBARH; geo.width = xsi[s].width; - efree(xsi); + free(xsi); } else { diff --git a/src/util.c b/src/util.c index 7302199..661c671 100644 --- a/src/util.c +++ b/src/util.c @@ -48,18 +48,6 @@ emalloc(uint element, uint size) return ret; } -/** Free with a conditions - * \param ptr void pointer -*/ -void -efree(void *ptr) -{ - if(ptr) - free(ptr); - - return; -} - /** Get a color with a string * \param color Color string * \return Color pixel diff --git a/src/wmfs.c b/src/wmfs.c index 6b2d8af..b189a28 100644 --- a/src/wmfs.c +++ b/src/wmfs.c @@ -101,12 +101,12 @@ quit(void) XFreeCursor(dpy, cursor[CurMove]); XFreeCursor(dpy, cursor[CurResize]); infobar_destroy(); - efree(infobar); - efree(seltag); - efree(keys); - efree(conf.titlebar.mouse); - efree(conf.client.mouse); - efree(conf.root.mouse); + free(infobar); + free(seltag); + free(keys); + free(conf.titlebar.mouse); + free(conf.client.mouse); + free(conf.root.mouse); XSync(dpy, False); return; diff --git a/src/wmfs.h b/src/wmfs.h index ab1ca1d..096b5b1 100644 --- a/src/wmfs.h +++ b/src/wmfs.h @@ -168,7 +168,6 @@ void uicb_mouse_resize(uicb_t cmd); /* util.c */ ulong color_enlight(ulong col); void *emalloc(uint element, uint size); -void efree(void *ptr); ulong getcolor(char *color); long getwinstate(Window win); double round(double x);