From: Panu Matilainen Date: Tue, 27 May 2008 17:16:17 +0000 (+0300) Subject: Turn silly one-case switches into if's X-Git-Tag: rpm-4.6.0-rc1~458 X-Git-Url: http://review.tizen.org/git/?a=commitdiff_plain;h=b10e0cc5ee430c77738f07509b1372c1c146cd2f;p=platform%2Fupstream%2Frpm.git Turn silly one-case switches into if's --- diff --git a/lib/rpmdb.c b/lib/rpmdb.c index 173d5df..ceaae06 100644 --- a/lib/rpmdb.c +++ b/lib/rpmdb.c @@ -2402,8 +2402,7 @@ int rpmdbRemove(rpmdb db, int rid, unsigned int hdrNum, if (isTemporaryDB(rpmtag)) continue; - switch ((rpm_tag_t) rpmtag) { - case RPMDBI_PACKAGES: + if (rpmtag == RPMDBI_PACKAGES) { dbi = dbiOpen(db, rpmtag, 0); if (dbi == NULL) /* XXX shouldn't happen */ continue; @@ -2427,7 +2426,6 @@ int rpmdbRemove(rpmdb db, int rid, unsigned int hdrNum, if (!dbi->dbi_no_dbsync) xx = dbiSync(dbi, 0); continue; - break; } if (!hge(h, rpmtag, &rpmtype, (rpm_data_t *) &rpmvals, &rpmcnt)) @@ -2451,14 +2449,10 @@ int rpmdbRemove(rpmdb db, int rid, unsigned int hdrNum, int stringvalued; uint8_t bin[32]; - switch (dbi->dbi_rpmtag) { - case RPMTAG_FILEMD5S: + if (dbi->dbi_rpmtag == RPMTAG_FILEMD5S) { /* Filter out empty MD5 strings. */ if (!(rpmvals[i] && *rpmvals[i] != '\0')) continue; - break; - default: - break; } /* Identify value pointer and length. */