util: Delete efree()

This commit is contained in:
Martin Duquesnoy 2008-11-30 03:19:09 +01:00
parent bacf2b194d
commit 62c353c0bc
6 changed files with 10 additions and 23 deletions

View File

@ -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;
}

View File

@ -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;
}

View File

@ -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
{

View File

@ -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

View File

@ -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;

View File

@ -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);