X-Git-Url: http://sjero.net/git/?p=wget;a=blobdiff_plain;f=src%2Fftp-ls.c;h=6fa16fa6de88c09c4d466b008fba1dba5e3965b0;hp=ca56a0948e887fdd26b672c902332b970cecb758;hb=908d7a4bcee5adb7d4768499282cc83075d0332e;hpb=277e840a0f8e3ec8800cfe7407fe3c16000bc622 diff --git a/src/ftp-ls.c b/src/ftp-ls.c index ca56a094..6fa16fa6 100644 --- a/src/ftp-ls.c +++ b/src/ftp-ls.c @@ -330,7 +330,7 @@ ftp_parse_unix_ls (const char *file, int ignore_perms) default -F output. I believe these cases are very rare. */ fnlen = strlen (tok); /* re-calculate `fnlen' */ - cur.name = (char *)xmalloc (fnlen + 1); + cur.name = xmalloc (fnlen + 1); memcpy (cur.name, tok, fnlen + 1); if (fnlen) { @@ -775,14 +775,14 @@ ftp_parse_vms_ls (const char *file) /* And put everything into the linked list */ if (!dir) { - l = dir = (struct fileinfo *)xmalloc (sizeof (struct fileinfo)); + l = dir = xnew (struct fileinfo); memcpy (l, &cur, sizeof (cur)); l->prev = l->next = NULL; } else { cur.prev = l; - l->next = (struct fileinfo *)xmalloc (sizeof (struct fileinfo)); + l->next = xnew (struct fileinfo); l = l->next; memcpy (l, &cur, sizeof (cur)); l->next = NULL;