summaryrefslogtreecommitdiff
path: root/lib
diff options
context:
space:
mode:
authorthorpej <thorpej@NetBSD.org>2000-06-02 22:09:01 +0000
committerthorpej <thorpej@NetBSD.org>2000-06-02 22:09:01 +0000
commit2d11440f4d536ef245ff83ee46eb989c766de088 (patch)
tree71dd527785809fcdc495199853512d274bd1a565 /lib
parent34a96c661b2fcc0756dbc3cfb749d9e786af5ed7 (diff)
Back out previous change. It causes all sorts of problems. The
memory leakage stuff should be addressed, but this change was obviously wrong.
Diffstat (limited to 'lib')
-rw-r--r--lib/libterm/termcap.c14
1 files changed, 7 insertions, 7 deletions
diff --git a/lib/libterm/termcap.c b/lib/libterm/termcap.c
index 2a2dcb95ec9..3a8250a1261 100644
--- a/lib/libterm/termcap.c
+++ b/lib/libterm/termcap.c
@@ -1,4 +1,4 @@
-/* $NetBSD: termcap.c,v 1.34 2000/06/02 18:00:42 christos Exp $ */
+/* $NetBSD: termcap.c,v 1.35 2000/06/02 22:09:01 thorpej Exp $ */
/*
* Copyright (c) 1980, 1993
@@ -38,7 +38,7 @@
#if 0
static char sccsid[] = "@(#)termcap.c 8.1 (Berkeley) 6/4/93";
#else
-__RCSID("$NetBSD: termcap.c,v 1.34 2000/06/02 18:00:42 christos Exp $");
+__RCSID("$NetBSD: termcap.c,v 1.35 2000/06/02 22:09:01 thorpej Exp $");
#endif
#endif /* not lint */
@@ -346,16 +346,16 @@ t_getstr(info, id, area, limit)
* area
*/
if (limit != NULL && (*limit < i)) {
- free(s);
errno = E2BIG;
+ free(s);
return NULL;
}
- (void)strcpy(*area, s);
- free(s);
- s = *area;
+
+ strcpy(*area, s);
*area += i + 1;
if (limit != NULL) *limit -= i;
- return (*area);
+
+ return (s);
} else {
_DIAGASSERT(limit != NULL);
*limit = i;