X-Git-Url: http://sjero.net/git/?p=wget;a=blobdiff_plain;f=src%2Fhtml-url.c;h=e26bd175afbec962eafe44ea79dd0a7c3f7bbdff;hp=f37ac85ee2a776ffcbd407286397c11773efdfb0;hb=5f0a2b3f0846dd4c2f72fc62e7171200d1fd6e06;hpb=370ff7a57640ff98cc399317927e8f3c51abad76 diff --git a/src/html-url.c b/src/html-url.c index f37ac85e..e26bd175 100644 --- a/src/html-url.c +++ b/src/html-url.c @@ -327,9 +327,7 @@ append_url (const char *link_uri, DEBUGP (("appending \"%s\" to urlpos.\n", url->url)); - newel = (struct urlpos *)xmalloc (sizeof (struct urlpos)); - memset (newel, 0, sizeof (*newel)); - + newel = xnew0 (struct urlpos); newel->next = NULL; newel->url = url; newel->pos = tag->attrs[attrind].value_raw_beginning - ctx->text; @@ -700,8 +698,7 @@ get_urls_file (const char *file) } xfree (url_text); - entry = (struct urlpos *)xmalloc (sizeof (struct urlpos)); - memset (entry, 0, sizeof (*entry)); + entry = xnew0 (struct urlpos); entry->next = NULL; entry->url = url;