aboutsummaryrefslogtreecommitdiff
path: root/format.c
diff options
context:
space:
mode:
authorTiago Cunha <tcunha@gmx.com>2012-07-11 19:34:16 +0000
committerTiago Cunha <tcunha@gmx.com>2012-07-11 19:34:16 +0000
commita432fcd30617610b46d65f49b7513bf5da5694de (patch)
treeb76ab1cefbd5a0020fa789b2c925f31ef9d5796b /format.c
parent06d27e94b25a49f7a9824e8bfdf6fb04f6baf46e (diff)
downloadrtmux-a432fcd30617610b46d65f49b7513bf5da5694de.tar.gz
rtmux-a432fcd30617610b46d65f49b7513bf5da5694de.tar.bz2
rtmux-a432fcd30617610b46d65f49b7513bf5da5694de.zip
Sync OpenBSD patchset 1150:
xfree is not particularly helpful, remove it. From Thomas Adam.
Diffstat (limited to 'format.c')
-rw-r--r--format.c19
1 files changed, 10 insertions, 9 deletions
diff --git a/format.c b/format.c
index b6c5858e..55d51df5 100644
--- a/format.c
+++ b/format.c
@@ -20,6 +20,7 @@
#include <netdb.h>
#include <stdarg.h>
+#include <stdlib.h>
#include <string.h>
#include <time.h>
#include <unistd.h>
@@ -102,12 +103,12 @@ format_free(struct format_tree *ft)
fe_next = RB_NEXT(format_tree, ft, fe);
RB_REMOVE(format_tree, ft, fe);
- xfree(fe->value);
- xfree(fe->key);
- xfree(fe);
+ free(fe->value);
+ free(fe->key);
+ free(fe);
}
- xfree (ft);
+ free (ft);
}
/* Add a key-value pair. */
@@ -195,11 +196,11 @@ format_replace(struct format_tree *ft,
memcpy(*buf + *off, value, valuelen);
*off += valuelen;
- xfree(copy);
+ free(copy);
return (0);
fail:
- xfree(copy);
+ free(copy);
return (-1);
}
@@ -351,8 +352,8 @@ format_winlink(struct format_tree *ft, struct session *s, struct winlink *wl)
format_add(ft, "window_active", "%d", wl == s->curw);
format_add(ft, "window_panes", "%u", window_count_panes(w));
- xfree(flags);
- xfree(layout);
+ free(flags);
+ free(layout);
}
/* Set default format keys for a window pane. */
@@ -403,5 +404,5 @@ format_paste_buffer(struct format_tree *ft, struct paste_buffer *pb)
format_add(ft, "buffer_size", "%zu", pb->size);
format_add(ft, "buffer_sample", "%s", pb_print);
- xfree(pb_print);
+ free(pb_print);
}