diff options
author | okan | 2012-11-07 20:34:39 +0000 |
---|---|---|
committer | okan | 2012-11-07 20:34:39 +0000 |
commit | b43ba68cd49c5275d9a817901bc52e5ab9e1fa0f (patch) | |
tree | 84c261aa6435bed59c69a13ba6b3f0fb5fab6f2b /kbfunc.c | |
parent | fbbfab69fda3ae91cc59549b0a4e9040a30378f3 (diff) | |
download | cwm-b43ba68cd49c5275d9a817901bc52e5ab9e1fa0f.tar.gz |
get rid of the xfree() wrapper around free(); from Tiago Cunha.
Diffstat (limited to '')
-rw-r--r-- | kbfunc.c | 23 |
1 files changed, 11 insertions, 12 deletions
@@ -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 |