index : pacman | |
Archlinux32 fork of pacman | gitolite user |
summaryrefslogtreecommitdiff |
author | Dan McGee <dan@archlinux.org> | 2011-09-18 17:32:15 -0500 |
---|---|---|
committer | Dan McGee <dan@archlinux.org> | 2011-09-18 17:32:15 -0500 |
commit | 41d8deff88ed7bdaf1820882687fb99107f60d2a (patch) | |
tree | 234b7d150bfb45e847eef8299e523e13e685d467 | |
parent | 86d9fcbfff6d806bcb6d0a19d73d09e1af4e1733 (diff) |
-rw-r--r-- | lib/libalpm/be_local.c | 8 |
diff --git a/lib/libalpm/be_local.c b/lib/libalpm/be_local.c index 552f7dd9..1b828d9c 100644 --- a/lib/libalpm/be_local.c +++ b/lib/libalpm/be_local.c @@ -500,14 +500,18 @@ static char *get_pkgpath(alpm_db_t *db, alpm_pkg_t *info) #define READ_AND_STORE_ALL(f) do { \ char *linedup; \ - if(fgets(line, sizeof(line), fp) == NULL && !feof(fp)) goto error; \ + if(fgets(line, sizeof(line), fp) == NULL) {\ + if(!feof(fp)) goto error; else break; \ + } \ if(_alpm_strip_newline(line) == 0) break; \ STRDUP(linedup, line, goto error); \ f = alpm_list_add(f, linedup); \ } while(1) /* note the while(1) and not (0) */ #define READ_AND_SPLITDEP(f) do { \ - if(fgets(line, sizeof(line), fp) == NULL && !feof(fp)) goto error; \ + if(fgets(line, sizeof(line), fp) == NULL) {\ + if(!feof(fp)) goto error; else break; \ + } \ if(_alpm_strip_newline(line) == 0) break; \ f = alpm_list_add(f, _alpm_splitdep(line)); \ } while(1) /* note the while(1) and not (0) */ |