summaryrefslogtreecommitdiff
path: root/libc/misc/ttyent/getttyent.c
diff options
context:
space:
mode:
authorBernd Schmidt <bernds_cb1@t-online.de>2008-06-12 10:31:17 +0000
committerBernd Schmidt <bernds_cb1@t-online.de>2008-06-12 10:31:17 +0000
commite433ede08ba069f5100737e22eb8627187ae8f92 (patch)
tree4c4a73520537a733eed495c342951a7c0112cd51 /libc/misc/ttyent/getttyent.c
parent74d1d18f6bc7140f9bc5568b939870d8ec89b9ad (diff)
Revert revision 19347, plus libc_hidden_proto for __uc_malloc.
Some of the code is functionally identical before and after, but for now I'm just mechanically reverting the entire mess.
Diffstat (limited to 'libc/misc/ttyent/getttyent.c')
-rw-r--r--libc/misc/ttyent/getttyent.c6
1 files changed, 3 insertions, 3 deletions
diff --git a/libc/misc/ttyent/getttyent.c b/libc/misc/ttyent/getttyent.c
index 7ec228514..b43422ddc 100644
--- a/libc/misc/ttyent/getttyent.c
+++ b/libc/misc/ttyent/getttyent.c
@@ -34,7 +34,6 @@
#include <ctype.h>
#include <string.h>
#include <stdlib.h>
-#include <malloc.h>
#ifdef __UCLIBC_HAS_THREADS__
#include <pthread.h>
#endif
@@ -55,7 +54,6 @@ libc_hidden_proto(__ctype_b_loc)
#elif defined __UCLIBC_HAS_CTYPE_TABLES__
libc_hidden_proto(__ctype_b)
#endif
-libc_hidden_proto(__uc_malloc)
static char zapchar;
static FILE *tf;
@@ -134,7 +132,9 @@ struct ttyent * getttyent(void)
return (NULL);
if (!line) {
- line = __uc_malloc(BUFSIZ);
+ line = malloc(BUFSIZ);
+ if (!line)
+ abort();
}
__STDIO_ALWAYS_THREADLOCK(tf);