summaryrefslogtreecommitdiffstats
path: root/screen.c
diff options
context:
space:
mode:
authorNicholas Marriott <nicm@openbsd.org>2012-07-10 11:53:01 +0000
committerNicholas Marriott <nicm@openbsd.org>2012-07-10 11:53:01 +0000
commitdf912e3540968a2a0b266e523ecc08bb2dc0ca20 (patch)
treec2c59d025e08aab048b251d1711ed655cdf115f6 /screen.c
parenta3391692ad5800ca034bbbdcd803924fc4e392ee (diff)
xfree is not particularly helpful, remove it. From Thomas Adam.
Diffstat (limited to 'screen.c')
-rw-r--r--screen.c14
1 files changed, 6 insertions, 8 deletions
diff --git a/screen.c b/screen.c
index ed5fcfce..7ffe2a24 100644
--- a/screen.c
+++ b/screen.c
@@ -70,10 +70,9 @@ screen_reinit(struct screen *s)
void
screen_free(struct screen *s)
{
- if (s->tabs != NULL)
- xfree(s->tabs);
- xfree(s->title);
- xfree(s->ccolour);
+ free(s->tabs);
+ free(s->title);
+ free(s->ccolour);
grid_destroy(s->grid);
}
@@ -83,8 +82,7 @@ screen_reset_tabs(struct screen *s)
{
u_int i;
- if (s->tabs != NULL)
- xfree(s->tabs);
+ free(s->tabs);
if ((s->tabs = bit_alloc(screen_size_x(s))) == NULL)
fatal("bit_alloc failed");
@@ -104,7 +102,7 @@ screen_set_cursor_style(struct screen *s, u_int style)
void
screen_set_cursor_colour(struct screen *s, const char *colour_string)
{
- xfree(s->ccolour);
+ free(s->ccolour);
s->ccolour = xstrdup(colour_string);
}
@@ -116,7 +114,7 @@ screen_set_title(struct screen *s, const char *title)
strlcpy(tmp, title, sizeof tmp);
- xfree(s->title);
+ free(s->title);
s->title = xstrdup(tmp);
}