diff options
Diffstat (limited to 'src')
-rw-r--r-- | src/pacman/download.c | 9 |
1 files changed, 4 insertions, 5 deletions
diff --git a/src/pacman/download.c b/src/pacman/download.c index f0195202..447021ef 100644 --- a/src/pacman/download.c +++ b/src/pacman/download.c @@ -562,7 +562,7 @@ char *fetch_pkgurl(char *target) } else { server_t *server; list_t *servers = NULL; - list_t *files = NULL; + list_t *files; server = (server_t *)malloc(sizeof(server_t)); if(server == NULL) { @@ -574,13 +574,12 @@ char *fetch_pkgurl(char *target) server->path = spath; servers = list_add(servers, server); - files = list_add(files, fn); + files = list_add(NULL, fn); if(downloadfiles(servers, ".", files)) { - fprintf(stderr, "error: failed to download %s\n", target); + ERR(NL, "failed to download %s\n", target); return(NULL); } - files->data = NULL; - FREELIST(files); + FREELISTPTR(files); FREELIST(servers); } |