aboutsummaryrefslogtreecommitdiffstats
path: root/URPM.xs
diff options
context:
space:
mode:
authorThierry Vignaud <tv@mageia.org>2012-06-17 20:38:42 +0000
committerThierry Vignaud <tv@mageia.org>2012-06-17 20:38:42 +0000
commit26eabb446703c00f9385011e0f4c269842016383 (patch)
tree78e5b68c1644d5479a7299eaea4384f81ddca8a0 /URPM.xs
parentffe4369510107162eea5a0e89a564b2fa039f55f (diff)
downloadperl-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
Diffstat (limited to 'URPM.xs')
-rw-r--r--URPM.xs20
1 files changed, 8 insertions, 12 deletions
diff --git a/URPM.xs b/URPM.xs
index 90fde89..4a06fb3 100644
--- a/URPM.xs
+++ b/URPM.xs
@@ -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;