about summary refs log tree commit diff stats
path: root/WWW/Library/Implementation/HTAnchor.c
diff options
context:
space:
mode:
Diffstat (limited to 'WWW/Library/Implementation/HTAnchor.c')
-rw-r--r--WWW/Library/Implementation/HTAnchor.c9
1 files changed, 2 insertions, 7 deletions
diff --git a/WWW/Library/Implementation/HTAnchor.c b/WWW/Library/Implementation/HTAnchor.c
index e9ebe1f3..42dcb4dc 100644
--- a/WWW/Library/Implementation/HTAnchor.c
+++ b/WWW/Library/Implementation/HTAnchor.c
@@ -860,13 +860,8 @@ PUBLIC char * HTAnchor_address ARGS1(
 	    !((HTChildAnchor *)me)->tag) {  /* it's an adult or no tag */
 	    StrAllocCopy(addr, me->parent->address);
 	} else {  /* it's a named child */
-	    addr = malloc(2 +
-			  strlen(me->parent->address) +
-			  strlen(((HTChildAnchor *)me)->tag));
-	    if (addr == NULL)
-		outofmem(__FILE__, "HTAnchor_address");
-	    sprintf(addr, "%s#%s",
-			   me->parent->address, ((HTChildAnchor *)me)->tag);
+	    HTSprintf0(&addr, "%s#%s",
+		       me->parent->address, ((HTChildAnchor *)me)->tag);
 	}
     }
     return(addr);