summaryrefslogtreecommitdiff
path: root/libc/inet
diff options
context:
space:
mode:
Diffstat (limited to 'libc/inet')
-rw-r--r--libc/inet/getnetent.c4
-rw-r--r--libc/inet/getproto.c5
-rw-r--r--libc/inet/getservice.c5
-rw-r--r--libc/inet/rpc/ruserpass.c6
4 files changed, 10 insertions, 10 deletions
diff --git a/libc/inet/getnetent.c b/libc/inet/getnetent.c
index 58e679070..99d87a3df 100644
--- a/libc/inet/getnetent.c
+++ b/libc/inet/getnetent.c
@@ -111,9 +111,7 @@ struct netent *getnetent(void)
again:
if (!line) {
- line = malloc(BUFSIZ + 1);
- if (!line)
- abort();
+ line = __uc_malloc(BUFSIZ + 1);
}
p = fgets(line, BUFSIZ, netf);
diff --git a/libc/inet/getproto.c b/libc/inet/getproto.c
index c1292ed30..6367ccfce 100644
--- a/libc/inet/getproto.c
+++ b/libc/inet/getproto.c
@@ -59,6 +59,7 @@
#include <stdio.h>
#include <stdlib.h>
#include <string.h>
+#include <malloc.h>
#include <errno.h>
libc_hidden_proto(fopen)
@@ -86,9 +87,7 @@ static int proto_stayopen;
static void __initbuf(void)
{
if (!static_aliases) {
- static_aliases = malloc(SBUFSIZE);
- if (!static_aliases)
- abort();
+ static_aliases = __uc_malloc(SBUFSIZE);
}
}
diff --git a/libc/inet/getservice.c b/libc/inet/getservice.c
index 5a94c9c69..9ea810be0 100644
--- a/libc/inet/getservice.c
+++ b/libc/inet/getservice.c
@@ -59,6 +59,7 @@
#include <stdio.h>
#include <string.h>
#include <stdlib.h>
+#include <malloc.h>
#include <netinet/in.h>
#include <arpa/inet.h>
#include <errno.h>
@@ -89,9 +90,7 @@ static int serv_stayopen;
static void __initbuf(void)
{
if (!servbuf) {
- servbuf = malloc(SBUFSIZE);
- if (!servbuf)
- abort();
+ servbuf = __uc_malloc(SBUFSIZE);
}
}
diff --git a/libc/inet/rpc/ruserpass.c b/libc/inet/rpc/ruserpass.c
index 0adcbf1d3..b18bbf5b7 100644
--- a/libc/inet/rpc/ruserpass.c
+++ b/libc/inet/rpc/ruserpass.c
@@ -40,6 +40,7 @@
#include <stdio_ext.h>
#include <stdlib.h>
#include <string.h>
+#include <malloc.h>
#include <strings.h>
#include <unistd.h>
@@ -79,7 +80,7 @@ static FILE *cfile;
#define ID 10
#define MACHINE 11
-static char tokval[100];
+static char *tokval; /* [100] */
static const char tokstr[] =
{
@@ -152,6 +153,9 @@ int ruserpass(const char *host, const char **aname, const char **apass)
if (mydomain==NULL) {
mydomain=myname + strlen(myname);
}
+
+ if (!tokval)
+ tokval = __uc_malloc(100);
next:
while ((t = token())) switch(t) {