diff options
author | Panu Matilainen <pmatilai@redhat.com> | 2014-01-31 10:13:37 +0200 |
---|---|---|
committer | Panu Matilainen <pmatilai@redhat.com> | 2014-01-31 10:26:33 +0200 |
commit | ee237ffdd98de8f0202f3db6c3b42bba05836078 (patch) | |
tree | 2f395aa6fd38f1e9085d3687e28d015602b9a196 | |
parent | 8e5864a406c796d3ee7e11a0f88a130fa16899d4 (diff) | |
download | rpm-ee237ffdd98de8f0202f3db6c3b42bba05836078.tar.gz |
Add internal rpmfiFound() helper function to match rpmfiSetFound()
- Makes the if that little bit more obvious and since we have
a function for setting...
-rw-r--r-- | lib/rpmfi.c | 7 |
1 files changed, 6 insertions, 1 deletions
diff --git a/lib/rpmfi.c b/lib/rpmfi.c index bfcd5e86d..ab2a6a2ee 100644 --- a/lib/rpmfi.c +++ b/lib/rpmfi.c @@ -1872,6 +1872,11 @@ static void rpmfiSetFound(rpmfi fi, int ix) fi->found[ix >> 3] |= (1 << (ix % 8)); } +static int rpmfiFound(rpmfi fi, int ix) +{ + return fi->found[ix >> 3] & (1 << (ix % 8)); +} + static int iterReadArchiveNext(rpmfi fi) { int rc; @@ -1888,7 +1893,7 @@ static int iterReadArchiveNext(rpmfi fi) if (rc == RPMERR_ITER_END) { int fc = rpmfiFC(fi); for (int i=0; i<fc; i++) { - if (!(fi->found[i>>3] & (1<<(i % 8))) && + if (!rpmfiFound(fi, i) && !(rpmfilesFFlags(fi->files, i) & RPMFILE_GHOST)) { rc = RPMERR_MISSING_FILE; break; |