summaryrefslogtreecommitdiff
path: root/src/term.c
diff options
context:
space:
mode:
Diffstat (limited to 'src/term.c')
-rw-r--r--src/term.c8
1 files changed, 3 insertions, 5 deletions
diff --git a/src/term.c b/src/term.c
index 506fc16ffb3..bae059ea439 100644
--- a/src/term.c
+++ b/src/term.c
@@ -2229,14 +2229,12 @@ to do `unset TERMCAP' (C-shell: `unsetenv TERMCAP') as well.",
#endif
}
-#ifdef TERMINFO
- area = (char *) xmalloc (buffer_size);
-#else
+#ifndef TERMINFO
if (strlen (buffer) >= buffer_size)
abort ();
-
- area = (char *) xmalloc (strlen (buffer));
+ buffer_size = strlen (buffer);
#endif
+ area = (char *) xmalloc (buffer_size);
TS_ins_line = tgetstr ("al", address);
TS_ins_multi_lines = tgetstr ("AL", address);