diff options
author | Thierry Vignaud <tv@mageia.org> | 2012-06-17 20:38:42 +0000 |
---|---|---|
committer | Thierry Vignaud <tv@mageia.org> | 2012-06-17 20:38:42 +0000 |
commit | 26eabb446703c00f9385011e0f4c269842016383 (patch) | |
tree | 78e5b68c1644d5479a7299eaea4384f81ddca8a0 | |
parent | ffe4369510107162eea5a0e89a564b2fa039f55f (diff) | |
download | perl-URPM-26eabb446703c00f9385011e0f4c269842016383.tar perl-URPM-26eabb446703c00f9385011e0f4c269842016383.tar.gz perl-URPM-26eabb446703c00f9385011e0f4c269842016383.tar.bz2 perl-URPM-26eabb446703c00f9385011e0f4c269842016383.tar.xz perl-URPM-26eabb446703c00f9385011e0f4c269842016383.zip |
(buildtime,get_tag) simplify
-rw-r--r-- | URPM.xs | 20 |
1 files changed, 8 insertions, 12 deletions
@@ -1561,12 +1561,10 @@ Pkg_buildtime(pkg) installtid = 1 CODE: if (pkg->h) { - switch (ix) { - case 1: - RETVAL = get_int(pkg->h, RPMTAG_INSTALLTID); break; - default: - RETVAL = get_int(pkg->h, RPMTAG_BUILDTIME); break; - } + if (ix == 1) + RETVAL = get_int(pkg->h, RPMTAG_INSTALLTID); + else + RETVAL = get_int(pkg->h, RPMTAG_BUILDTIME); } else RETVAL = 0; OUTPUT: @@ -2154,12 +2152,10 @@ Pkg_get_tag(pkg, tagname) get_tag_modifiers = 1 PPCODE: PUTBACK; - switch (ix) { - case 0: - return_list_tag(pkg, tagname); break; - case 1: - return_list_tag_modifier(pkg->h, tagname); break; - } + if (ix == 0) + return_list_tag(pkg, tagname); + else + return_list_tag_modifier(pkg->h, tagname); SPAGAIN; |