summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--app/cwm/calmwm.h3
-rw-r--r--app/cwm/client.c12
-rw-r--r--app/cwm/conf.c27
-rw-r--r--app/cwm/group.c8
-rw-r--r--app/cwm/kbfunc.c23
-rw-r--r--app/cwm/menu.c8
-rw-r--r--app/cwm/mousefunc.c6
-rw-r--r--app/cwm/xmalloc.c8
-rw-r--r--app/cwm/xutil.c4
9 files changed, 45 insertions, 54 deletions
diff --git a/app/cwm/calmwm.h b/app/cwm/calmwm.h
index 0fa5f8076..9370f5799 100644
--- a/app/cwm/calmwm.h
+++ b/app/cwm/calmwm.h
@@ -15,7 +15,7 @@
* ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING OUT OF
* OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE.
*
- * $OpenBSD: calmwm.h,v 1.157 2012/11/07 14:40:51 okan Exp $
+ * $OpenBSD: calmwm.h,v 1.158 2012/11/07 20:34:39 okan Exp $
*/
#ifndef _CALMWM_H_
@@ -490,7 +490,6 @@ void u_exec(char *);
void u_spawn(char *);
void *xcalloc(size_t, size_t);
-void xfree(void *);
void *xmalloc(size_t);
char *xstrdup(const char *);
diff --git a/app/cwm/client.c b/app/cwm/client.c
index 2276520d5..43f41a91f 100644
--- a/app/cwm/client.c
+++ b/app/cwm/client.c
@@ -15,7 +15,7 @@
* ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING OUT OF
* OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE.
*
- * $OpenBSD: client.c,v 1.101 2012/09/09 19:47:47 okan Exp $
+ * $OpenBSD: client.c,v 1.102 2012/11/07 20:34:39 okan Exp $
*/
#include <sys/param.h>
@@ -166,12 +166,12 @@ client_delete(struct client_ctx *cc)
while ((wn = TAILQ_FIRST(&cc->nameq)) != NULL) {
TAILQ_REMOVE(&cc->nameq, wn, entry);
if (wn->name != emptystring)
- xfree(wn->name);
- xfree(wn);
+ free(wn->name);
+ free(wn);
}
client_freehints(cc);
- xfree(cc);
+ free(cc);
}
void
@@ -582,8 +582,8 @@ match:
assert(wn != NULL);
TAILQ_REMOVE(&cc->nameq, wn, entry);
if (wn->name != emptystring)
- xfree(wn->name);
- xfree(wn);
+ free(wn->name);
+ free(wn);
cc->nameqlen--;
}
}
diff --git a/app/cwm/conf.c b/app/cwm/conf.c
index bef35b9c5..649863588 100644
--- a/app/cwm/conf.c
+++ b/app/cwm/conf.c
@@ -15,7 +15,7 @@
* ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING OUT OF
* OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE.
*
- * $OpenBSD: conf.c,v 1.102 2012/10/31 22:06:24 okan Exp $
+ * $OpenBSD: conf.c,v 1.103 2012/11/07 20:34:39 okan Exp $
*/
#include <sys/param.h>
@@ -202,36 +202,35 @@ conf_clear(struct conf *c)
while ((cmd = TAILQ_FIRST(&c->cmdq)) != NULL) {
TAILQ_REMOVE(&c->cmdq, cmd, entry);
- xfree(cmd);
+ free(cmd);
}
while ((kb = TAILQ_FIRST(&c->keybindingq)) != NULL) {
TAILQ_REMOVE(&c->keybindingq, kb, entry);
- xfree(kb);
+ free(kb);
}
while ((ag = TAILQ_FIRST(&c->autogroupq)) != NULL) {
TAILQ_REMOVE(&c->autogroupq, ag, entry);
- xfree(ag->class);
- if (ag->name)
- xfree(ag->name);
- xfree(ag);
+ free(ag->class);
+ free(ag->name);
+ free(ag);
}
while ((wm = TAILQ_FIRST(&c->ignoreq)) != NULL) {
TAILQ_REMOVE(&c->ignoreq, wm, entry);
- xfree(wm);
+ free(wm);
}
while ((mb = TAILQ_FIRST(&c->mousebindingq)) != NULL) {
TAILQ_REMOVE(&c->mousebindingq, mb, entry);
- xfree(mb);
+ free(mb);
}
for (i = 0; i < CWM_COLOR_MAX; i++)
- xfree(c->color[i].name);
+ free(c->color[i].name);
- xfree(c->font);
+ free(c->font);
}
void
@@ -477,7 +476,7 @@ conf_bindname(struct conf *c, char *name, char *binding)
if (current_binding->keysym == NoSymbol &&
current_binding->keycode == 0) {
- xfree(current_binding);
+ free(current_binding);
return;
}
@@ -523,7 +522,7 @@ conf_unbind(struct conf *c, struct keybinding *unbind)
key->keysym == unbind->keysym) {
conf_ungrab(c, key);
TAILQ_REMOVE(&c->keybindingq, key, entry);
- xfree(key);
+ free(key);
}
}
}
@@ -603,7 +602,7 @@ conf_mouseunbind(struct conf *c, struct mousebinding *unbind)
if (mb->button == unbind->button) {
TAILQ_REMOVE(&c->mousebindingq, mb, entry);
- xfree(mb);
+ free(mb);
}
}
}
diff --git a/app/cwm/group.c b/app/cwm/group.c
index f644851a4..ac663f08b 100644
--- a/app/cwm/group.c
+++ b/app/cwm/group.c
@@ -16,7 +16,7 @@
* ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING OUT OF
* OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE.
*
- * $OpenBSD: group.c,v 1.60 2012/09/09 20:52:57 okan Exp $
+ * $OpenBSD: group.c,v 1.61 2012/11/07 20:34:39 okan Exp $
*/
#include <sys/param.h>
@@ -129,7 +129,7 @@ group_show(struct screen_ctx *sc, struct group_ctx *gc)
}
XRestackWindows(X_Dpy, winlist, gc->nhidden);
- xfree(winlist);
+ free(winlist);
gc->hidden = 0;
group_setactive(sc, gc->shortcut - 1);
@@ -387,7 +387,7 @@ group_menu(XButtonEvent *e)
cleanup:
while ((mi = TAILQ_FIRST(&menuq)) != NULL) {
TAILQ_REMOVE(&menuq, mi, entry);
- xfree(mi);
+ free(mi);
}
}
@@ -491,7 +491,7 @@ group_update_names(struct screen_ctx *sc)
if (prop_ret != NULL)
XFree(prop_ret);
if (sc->group_nonames != 0)
- xfree(sc->group_names);
+ free(sc->group_names);
sc->group_names = strings;
sc->group_nonames = n;
diff --git a/app/cwm/kbfunc.c b/app/cwm/kbfunc.c
index 606f5400e..8a00a75a7 100644
--- a/app/cwm/kbfunc.c
+++ b/app/cwm/kbfunc.c
@@ -15,7 +15,7 @@
* ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING OUT OF
* OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE.
*
- * $OpenBSD: kbfunc.c,v 1.66 2012/11/07 14:49:46 okan Exp $
+ * $OpenBSD: kbfunc.c,v 1.67 2012/11/07 20:34:39 okan Exp $
*/
#include <sys/param.h>
@@ -170,7 +170,7 @@ kbfunc_client_search(struct client_ctx *cc, union arg *arg)
while ((mi = TAILQ_FIRST(&menuq)) != NULL) {
TAILQ_REMOVE(&menuq, mi, entry);
- xfree(mi);
+ free(mi);
}
}
@@ -197,7 +197,7 @@ kbfunc_menu_search(struct client_ctx *cc, union arg *arg)
while ((mi = TAILQ_FIRST(&menuq)) != NULL) {
TAILQ_REMOVE(&menuq, mi, entry);
- xfree(mi);
+ free(mi);
}
}
@@ -297,7 +297,7 @@ kbfunc_exec(struct client_ctx *cc, union arg *arg)
}
(void)closedir(dirp);
}
- xfree(path);
+ free(path);
if ((mi = menu_filter(sc, &menuq, label, NULL,
CWM_MENU_DUMMY | CWM_MENU_FILE,
@@ -319,10 +319,10 @@ kbfunc_exec(struct client_ctx *cc, union arg *arg)
}
out:
if (mi != NULL && mi->dummy)
- xfree(mi);
+ free(mi);
while ((mi = TAILQ_FIRST(&menuq)) != NULL) {
TAILQ_REMOVE(&menuq, mi, entry);
- xfree(mi);
+ free(mi);
}
}
@@ -375,7 +375,7 @@ kbfunc_ssh(struct client_ctx *cc, union arg *arg)
(void)strlcpy(mi->text, hostbuf, sizeof(mi->text));
TAILQ_INSERT_TAIL(&menuq, mi, entry);
}
- xfree(lbuf);
+ free(lbuf);
(void)fclose(fp);
if ((mi = menu_filter(sc, &menuq, "ssh", NULL, CWM_MENU_DUMMY,
@@ -389,10 +389,10 @@ kbfunc_ssh(struct client_ctx *cc, union arg *arg)
}
out:
if (mi != NULL && mi->dummy)
- xfree(mi);
+ free(mi);
while ((mi = TAILQ_FIRST(&menuq)) != NULL) {
TAILQ_REMOVE(&menuq, mi, entry);
- xfree(mi);
+ free(mi);
}
}
@@ -409,11 +409,10 @@ kbfunc_client_label(struct client_ctx *cc, union arg *arg)
search_match_text, NULL);
if (!mi->abort) {
- if (cc->label != NULL)
- xfree(cc->label);
+ free(cc->label);
cc->label = xstrdup(mi->text);
}
- xfree(mi);
+ free(mi);
}
void
diff --git a/app/cwm/menu.c b/app/cwm/menu.c
index 72ae3ebcc..26fc28346 100644
--- a/app/cwm/menu.c
+++ b/app/cwm/menu.c
@@ -16,7 +16,7 @@
* ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING OUT OF
* OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE.
*
- * $OpenBSD: menu.c,v 1.42 2012/11/07 14:39:44 okan Exp $
+ * $OpenBSD: menu.c,v 1.43 2012/11/07 20:34:39 okan Exp $
*/
#include <sys/param.h>
@@ -188,7 +188,7 @@ menu_filter(struct screen_ctx *sc, struct menu_q *menuq, char *prompt,
out:
if ((mc.flags & CWM_MENU_DUMMY) == 0 && mi->dummy) {
/* no mouse based match */
- xfree(mi);
+ free(mi);
mi = NULL;
}
@@ -225,7 +225,7 @@ menu_complete_path(struct menu_ctx *mc)
while ((mi = TAILQ_FIRST(&menuq)) != NULL) {
TAILQ_REMOVE(&menuq, mi, entry);
- xfree(mi);
+ free(mi);
}
if (path[0] != '\0')
@@ -233,7 +233,7 @@ menu_complete_path(struct menu_ctx *mc)
mc->searchstr, path);
else if (!mr->abort)
strlcpy(mr->text, mc->searchstr, sizeof(mr->text));
- xfree(path);
+ free(path);
return (mr);
}
diff --git a/app/cwm/mousefunc.c b/app/cwm/mousefunc.c
index 5af879829..a5e715ef1 100644
--- a/app/cwm/mousefunc.c
+++ b/app/cwm/mousefunc.c
@@ -16,7 +16,7 @@
* ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING OUT OF
* OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE.
*
- * $OpenBSD: mousefunc.c,v 1.38 2012/09/09 19:47:47 okan Exp $
+ * $OpenBSD: mousefunc.c,v 1.39 2012/11/07 20:34:39 okan Exp $
*/
#include <sys/param.h>
@@ -253,7 +253,7 @@ mousefunc_menu_unhide(struct client_ctx *cc, void *arg)
} else {
while ((mi = TAILQ_FIRST(&menuq)) != NULL) {
TAILQ_REMOVE(&menuq, mi, entry);
- xfree(mi);
+ free(mi);
}
}
}
@@ -282,6 +282,6 @@ mousefunc_menu_cmd(struct client_ctx *cc, void *arg)
else
while ((mi = TAILQ_FIRST(&menuq)) != NULL) {
TAILQ_REMOVE(&menuq, mi, entry);
- xfree(mi);
+ free(mi);
}
}
diff --git a/app/cwm/xmalloc.c b/app/cwm/xmalloc.c
index 5f7603b61..2c4215708 100644
--- a/app/cwm/xmalloc.c
+++ b/app/cwm/xmalloc.c
@@ -15,7 +15,7 @@
* ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING OUT OF
* OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE.
*
- * $OpenBSD: xmalloc.c,v 1.7 2011/05/11 13:53:51 okan Exp $
+ * $OpenBSD: xmalloc.c,v 1.8 2012/11/07 20:34:39 okan Exp $
*/
#include <sys/param.h>
@@ -52,12 +52,6 @@ xcalloc(size_t no, size_t siz)
return (p);
}
-void
-xfree(void *p)
-{
- free(p);
-}
-
char *
xstrdup(const char *str)
{
diff --git a/app/cwm/xutil.c b/app/cwm/xutil.c
index 11f342bce..e43a30a13 100644
--- a/app/cwm/xutil.c
+++ b/app/cwm/xutil.c
@@ -15,7 +15,7 @@
* ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING OUT OF
* OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE.
*
- * $OpenBSD: xutil.c,v 1.46 2012/10/31 19:30:19 okan Exp $
+ * $OpenBSD: xutil.c,v 1.47 2012/11/07 20:34:39 okan Exp $
*/
#include <sys/param.h>
@@ -339,7 +339,7 @@ xu_ewmh_net_client_list(struct screen_ctx *sc)
winlist[j++] = cc->win;
XChangeProperty(X_Dpy, sc->rootwin, ewmh[_NET_CLIENT_LIST].atom,
XA_WINDOW, 32, PropModeReplace, (unsigned char *)winlist, i);
- xfree(winlist);
+ free(winlist);
}
void