summaryrefslogtreecommitdiffstats
path: root/src/pacman/conf.c
diff options
context:
space:
mode:
Diffstat (limited to 'src/pacman/conf.c')
-rw-r--r--src/pacman/conf.c7
1 files changed, 5 insertions, 2 deletions
diff --git a/src/pacman/conf.c b/src/pacman/conf.c
index a4d115dd..69562067 100644
--- a/src/pacman/conf.c
+++ b/src/pacman/conf.c
@@ -203,11 +203,14 @@ static int download_with_xfercommand(const char *url, const char *localpath,
cleanup:
/* restore the old cwd if we have it */
if(cwdfd >= 0) {
+ int ret;
if(fchdir(cwdfd) != 0) {
pm_printf(ALPM_LOG_ERROR, _("could not restore working directory (%s)\n"),
strerror(errno));
}
- close(cwdfd);
+ do {
+ ret = close(cwdfd);
+ } while(ret == -1 && errno == EINTR);
}
if(ret == -1) {
@@ -659,7 +662,7 @@ static int finish_section(struct section_t *section, int parse_options)
}
for(i = section->servers; i; i = alpm_list_next(i)) {
- char *value = alpm_list_getdata(i);
+ char *value = i->data;
if(_add_mirror(db, value) != 0) {
pm_printf(ALPM_LOG_ERROR,
_("could not add mirror '%s' to database '%s' (%s)\n"),