summaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
authorAurelien Foret <aurelien@archlinux.org>2006-01-13 20:54:36 +0000
committerAurelien Foret <aurelien@archlinux.org>2006-01-13 20:54:36 +0000
commit365e440e802d4c59cc61419a4fca309c435f281e (patch)
treeee4efa97f083acd73eed85dd9e348495afc24c08 /src
parentca67579656f66e7dec61cf6c5c1ddde347b3134b (diff)
downloadpacman-365e440e802d4c59cc61419a4fca309c435f281e.tar.xz
code cleanup
Diffstat (limited to 'src')
-rw-r--r--src/pacman/download.c9
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);
}