From b10e0cc5ee430c77738f07509b1372c1c146cd2f Mon Sep 17 00:00:00 2001 From: Panu Matilainen Date: Tue, 27 May 2008 20:16:17 +0300 Subject: [PATCH] Turn silly one-case switches into if's --- lib/rpmdb.c | 10 ++-------- 1 file changed, 2 insertions(+), 8 deletions(-) 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. */ -- 2.7.4