Skip to content

Commit

Permalink
Correctly test return of pkg_files and pkg_dirs
Browse files Browse the repository at this point in the history
Reported by:	jilles@
  • Loading branch information
bapt committed May 20, 2012
1 parent 69960eb commit d1e7bf9
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions libpkg/pkg_jobs.c
Expand Up @@ -128,7 +128,7 @@ pkg_jobs_keep_files_to_del(struct pkg *p1, struct pkg *p2)
continue;

f2 = NULL;
while (pkg_files(p2, &f2)) {
while (pkg_files(p2, &f2) == EPKG_OK) {
if (strcmp(pkg_file_get(f1, PKG_FILE_PATH), pkg_file_get(f2, PKG_FILE_PATH)) == 0) {
f1->keep = 1;
break;
Expand All @@ -140,7 +140,7 @@ pkg_jobs_keep_files_to_del(struct pkg *p1, struct pkg *p2)
if (d1->keep == 1)
continue;
d2 = NULL;
while (pkg_dirs(p2, &d2)) {
while (pkg_dirs(p2, &d2) == EPKG_OK) {
if (strcmp(pkg_dir_path(d1), pkg_dir_path(d2)) == 0) {
d1->keep = 1;
break;
Expand Down

0 comments on commit d1e7bf9

Please sign in to comment.