diff options
author | 2012-07-10 11:53:01 +0000 | |
---|---|---|
committer | 2012-07-10 11:53:01 +0000 | |
commit | 7d053cf95f3066c6e73307ead04fc57226a3af39 (patch) | |
tree | efeaa09d389b020f6bce2de45058037a32cbbf0e /usr.bin/tmux/paste.c | |
parent | Instead of <arpa/inet.h> pulling in <netinet/in.h>, just copy in the (diff) | |
download | wireguard-openbsd-7d053cf95f3066c6e73307ead04fc57226a3af39.tar.xz wireguard-openbsd-7d053cf95f3066c6e73307ead04fc57226a3af39.zip |
xfree is not particularly helpful, remove it. From Thomas Adam.
Diffstat (limited to 'usr.bin/tmux/paste.c')
-rw-r--r-- | usr.bin/tmux/paste.c | 17 |
1 files changed, 9 insertions, 8 deletions
diff --git a/usr.bin/tmux/paste.c b/usr.bin/tmux/paste.c index def59f83e18..2b0a0ac88a8 100644 --- a/usr.bin/tmux/paste.c +++ b/usr.bin/tmux/paste.c @@ -1,4 +1,4 @@ -/* $OpenBSD: paste.c,v 1.11 2011/03/28 19:44:31 nicm Exp $ */ +/* $OpenBSD: paste.c,v 1.12 2012/07/10 11:53:01 nicm Exp $ */ /* * Copyright (c) 2007 Nicholas Marriott <nicm@users.sourceforge.net> @@ -19,6 +19,7 @@ #include <sys/types.h> #include <sys/time.h> +#include <stdlib.h> #include <string.h> #include <vis.h> @@ -70,8 +71,8 @@ paste_free_top(struct paste_stack *ps) pb = ARRAY_FIRST(ps); ARRAY_REMOVE(ps, 0); - xfree(pb->data); - xfree(pb); + free(pb->data); + free(pb); return (0); } @@ -88,8 +89,8 @@ paste_free_index(struct paste_stack *ps, u_int idx) pb = ARRAY_ITEM(ps, idx); ARRAY_REMOVE(ps, idx); - xfree(pb->data); - xfree(pb); + free(pb->data); + free(pb); return (0); } @@ -108,8 +109,8 @@ paste_add(struct paste_stack *ps, char *data, size_t size, u_int limit) while (ARRAY_LENGTH(ps) >= limit) { pb = ARRAY_LAST(ps); - xfree(pb->data); - xfree(pb); + free(pb->data); + free(pb); ARRAY_TRUNC(ps, 1); } @@ -137,7 +138,7 @@ paste_replace(struct paste_stack *ps, u_int idx, char *data, size_t size) return (-1); pb = ARRAY_ITEM(ps, idx); - xfree(pb->data); + free(pb->data); pb->data = data; pb->size = size; |