util: Delete efree()
This commit is contained in:
parent
bacf2b194d
commit
62c353c0bc
@ -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;
|
||||
}
|
||||
|
||||
@ -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;
|
||||
}
|
||||
|
||||
@ -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
|
||||
{
|
||||
|
||||
12
src/util.c
12
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
|
||||
|
||||
12
src/wmfs.c
12
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;
|
||||
|
||||
@ -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);
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user