about summary refs log tree commit diff stats
path: root/WWW/Library/Implementation/HTWAIS.c
diff options
context:
space:
mode:
authorThomas E. Dickey <dickey@invisible-island.net>2000-03-27 03:37:59 -0500
committerThomas E. Dickey <dickey@invisible-island.net>2000-03-27 03:37:59 -0500
commitc68ecb8b21bef3908cb17f8d1d4af694bf7e7137 (patch)
treeb433eeff77822973f7bdb7de3642e7a21ccbe5a8 /WWW/Library/Implementation/HTWAIS.c
parentd70fdcf7f031566fd582362899099f9fba23a7ac (diff)
downloadlynx-snapshots-c68ecb8b21bef3908cb17f8d1d4af694bf7e7137.tar.gz
snapshot of project "lynx", label v2-8-3dev_23
Diffstat (limited to 'WWW/Library/Implementation/HTWAIS.c')
-rw-r--r--WWW/Library/Implementation/HTWAIS.c13
1 files changed, 4 insertions, 9 deletions
diff --git a/WWW/Library/Implementation/HTWAIS.c b/WWW/Library/Implementation/HTWAIS.c
index ad6f73ba..c5ed3338 100644
--- a/WWW/Library/Implementation/HTWAIS.c
+++ b/WWW/Library/Implementation/HTWAIS.c
@@ -87,8 +87,6 @@
 
 #define HEX_ESCAPE '%'
 
-extern HTCJKlang HTCJK;
-
 extern int WWW_TraceFlag;	/* Control diagnostic output */
 extern FILE * logfile;		/* Log file output */
 
@@ -266,7 +264,9 @@ PRIVATE char * WWW_from_WAIS ARGS1(
     static char buf[BIG];
     char * q = buf;
     char * p = (docid->bytes);
+    char * result = NULL;
     int i, l;
+
     if (TRACE) {
 	char *p;
 	fprintf(tfp, "WAIS id (%d bytes) is ", (int)docid->size);
@@ -312,13 +312,8 @@ PRIVATE char * WWW_from_WAIS ARGS1(
     }
     *q++ = 0;			/* Terminate string */
     CTRACE((tfp, "WWW form of id: %s\n", buf));
-    {
-	char * result = (char *)malloc(strlen(buf)+1);
-	if (!result)
-	    outofmem(__FILE__, "WWW_from_WAIS");
-	strcpy(result, buf);
-	return result;
-    }
+    StrAllocCopy(result, buf);
+    return result;
 } /* WWW_from_WAIS */
 
 /*	Transform URL into WAIS document identifier