From 365e440e802d4c59cc61419a4fca309c435f281e Mon Sep 17 00:00:00 2001 From: Aurelien Foret Date: Fri, 13 Jan 2006 20:54:36 +0000 Subject: code cleanup --- src/pacman/download.c | 9 ++++----- 1 file changed, 4 insertions(+), 5 deletions(-) (limited to 'src') 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); } -- cgit v1.2.3-70-g09d2