]> sjero.net Git - wget/blobdiff - src/url.c
[svn] Use new macros xnew, xnew0, xnew_array, and xnew0_array in various places.
[wget] / src / url.c
index 132479428ec2e27497a1a1abfb95bc79a704e974..40482b75adf6bca8ecf3992f258f7cf26584d232 100644 (file)
--- a/src/url.c
+++ b/src/url.c
@@ -971,9 +971,7 @@ url_parse (const char *url, int *error)
        }
     }
 
-  u = (struct url *)xmalloc (sizeof (struct url));
-  memset (u, 0, sizeof (*u));
-
+  u = xnew0 (struct url);
   u->scheme = scheme;
   u->host   = strdupdelim (host_b, host_e);
   u->port   = port;