From 88483db112b15569aad4898d30a8ab7ea4deb96b Mon Sep 17 00:00:00 2001 From: Denis Vlasenko Date: Mon, 30 Jul 2007 17:02:06 +0000 Subject: make regex_old.c, ruserpass.c use __uc_malloc, replace "buf = malloc(BUFSIZ); if (!buf) abort();" by __uc_malloc elsewhere. With last 7 patches together uclibc has 3k of static data total with fairly big .config and with 2k being used for 2 x BUFSIZ stdio buffer: text data bss dec hex filename 114 132 2048 2294 8f6 _stdio.o (ex lib/libc.a) total data 593 total bss 3062 --- libc/inet/getservice.c | 5 ++--- 1 file changed, 2 insertions(+), 3 deletions(-) (limited to 'libc/inet/getservice.c') 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 #include #include +#include #include #include #include @@ -89,9 +90,7 @@ static int serv_stayopen; static void __initbuf(void) { if (!servbuf) { - servbuf = malloc(SBUFSIZE); - if (!servbuf) - abort(); + servbuf = __uc_malloc(SBUFSIZE); } } -- cgit v1.2.3