From: Panu Matilainen Date: Tue, 28 Sep 2010 19:47:44 +0000 (+0300) Subject: Eliminate silly leftover switch-case from _tagType() X-Git-Tag: tznext/4.11.0.1.tizen20130304~1616 X-Git-Url: http://review.tizen.org/git/?a=commitdiff_plain;h=da2c5fd2cf3b357ba06e786e8aa96a2b67e52eb0;p=tools%2Flibrpm-tizen.git Eliminate silly leftover switch-case from _tagType() - Anybody calling rpmTagGetType() with RPMDBI_PACKAGES deserves to wait for the search to figure there's no such thing and return RPM_NULL_TYPE like with the switch case. Eliminates another enum comparison mismatch warning. --- diff --git a/lib/tagname.c b/lib/tagname.c index 40e7f7a..c847728 100644 --- a/lib/tagname.c +++ b/lib/tagname.c @@ -177,13 +177,7 @@ static rpmTagType _tagType(rpmTag tag) if (_rpmTags.byValue == NULL) xx = tagLoadIndex(&_rpmTags.byValue, &_rpmTags.byValueSize, tagCmpValue); - - switch (tag) { - case RPMDBI_PACKAGES: - break; - default: - if (_rpmTags.byValue == NULL) - break; + if (_rpmTags.byValue) { l = 0; u = _rpmTags.byValueSize; while (l < u) { @@ -206,7 +200,6 @@ static rpmTagType _tagType(rpmTag tag) return (rpmTagType)(t->type | t->retype); } } - break; } return RPM_NULL_TYPE; }