From a735f5ad5123baaa15a0057515f3b242c5d3f372 Mon Sep 17 00:00:00 2001 From: "Thomas E. Dickey" Date: Fri, 23 Apr 1999 15:06:34 -0400 Subject: snapshot of project "lynx", label v2-8-2dev_23 --- src/HTInit.c | 10 +++------- 1 file changed, 3 insertions(+), 7 deletions(-) (limited to 'src/HTInit.c') diff --git a/src/HTInit.c b/src/HTInit.c index f6ab32fa..836a3422 100644 --- a/src/HTInit.c +++ b/src/HTInit.c @@ -272,16 +272,14 @@ PRIVATE int ProcessMailcapEntry ARGS2( struct MailcapEntry *, mc) { size_t rawentryalloc = 2000, len; - char *rawentry, *s, *t, *LineBuf; + char *rawentry, *s, *t; + char *LineBuf = NULL; - LineBuf = (char *)malloc(LINE_BUF_SIZE); - if (!LineBuf) - ExitWithError(MEMORY_EXHAUSTED_ABORT); rawentry = (char *)malloc(1 + rawentryalloc); if (!rawentry) ExitWithError(MEMORY_EXHAUSTED_ABORT); *rawentry = '\0'; - while (fgets(LineBuf, LINE_BUF_SIZE, fp)) { + while ((LineBuf = LYSafeGets(LineBuf, fp)) != 0) { if (LineBuf[0] == '#') continue; len = strlen(LineBuf); @@ -304,8 +302,6 @@ PRIVATE int ProcessMailcapEntry ARGS2( } } - FREE(LineBuf); - s = LYSkipBlanks(rawentry); if (!*s) { /* totally blank entry -- quietly ignore */ -- cgit 1.4.1-2-gfad0 og blame commit diff stats
path: root/COPYING
blob: 05065e83165762c09d0b9b7be7a859cffbb237c0 (plain) (tree)
1
2
3
4
5
6
7
8
9
10
11
12
13