summaryrefslogtreecommitdiffstats
path: root/tty-term.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 /tty-term.c
parenta3391692ad5800ca034bbbdcd803924fc4e392ee (diff)
xfree is not particularly helpful, remove it. From Thomas Adam.
Diffstat (limited to 'tty-term.c')
-rw-r--r--tty-term.c15
1 files changed, 7 insertions, 8 deletions
diff --git a/tty-term.c b/tty-term.c
index d79cbf2f..f088d251 100644
--- a/tty-term.c
+++ b/tty-term.c
@@ -252,7 +252,7 @@ tty_term_override(struct tty_term *term, const char *overrides)
*ptr++ = '\0';
val = xstrdup(ptr);
if (strunvis(val, ptr) == -1) {
- xfree(val);
+ free(val);
val = xstrdup(ptr);
}
} else if (entstr[strlen(entstr) - 1] == '@') {
@@ -278,7 +278,7 @@ tty_term_override(struct tty_term *term, const char *overrides)
break;
case TTYCODE_STRING:
if (code->type == TTYCODE_STRING)
- xfree(code->value.string);
+ free(code->value.string);
code->value.string = xstrdup(val);
code->type = ent->type;
break;
@@ -296,12 +296,11 @@ tty_term_override(struct tty_term *term, const char *overrides)
}
}
- if (val != NULL)
- xfree(val);
+ free(val);
}
}
- xfree(s);
+ free(s);
}
struct tty_term *
@@ -463,10 +462,10 @@ tty_term_free(struct tty_term *term)
for (i = 0; i < NTTYCODE; i++) {
if (term->codes[i].type == TTYCODE_STRING)
- xfree(term->codes[i].value.string);
+ free(term->codes[i].value.string);
}
- xfree(term->name);
- xfree(term);
+ free(term->name);
+ free(term);
}
int