aboutsummaryrefslogtreecommitdiffstats
path: root/URPM.xs
diff options
context:
space:
mode:
authorThierry Vignaud <tv@mageia.org>2012-06-22 16:02:56 +0000
committerThierry Vignaud <tv@mageia.org>2012-06-22 16:02:56 +0000
commit525ddb9ffcfbc77661e6532d28d6c91f08eba93e (patch)
tree47d9c9914e03b81bec414bd0f409224162845841 /URPM.xs
parent9f9a92b7dee5615ab213a3217fcccbdda01af16c (diff)
downloadperl-URPM-525ddb9ffcfbc77661e6532d28d6c91f08eba93e.tar
perl-URPM-525ddb9ffcfbc77661e6532d28d6c91f08eba93e.tar.gz
perl-URPM-525ddb9ffcfbc77661e6532d28d6c91f08eba93e.tar.bz2
perl-URPM-525ddb9ffcfbc77661e6532d28d6c91f08eba93e.tar.xz
perl-URPM-525ddb9ffcfbc77661e6532d28d6c91f08eba93e.zip
(compare_pkgs,compare) style: indent after last changes
Diffstat (limited to 'URPM.xs')
-rw-r--r--URPM.xs34
1 files changed, 16 insertions, 18 deletions
diff --git a/URPM.xs b/URPM.xs
index e8ec8c3..34d325d 100644
--- a/URPM.xs
+++ b/URPM.xs
@@ -1639,7 +1639,7 @@ Pkg_compare_pkg(lpkg, rpkg)
}
compare = compare_evrs(lepoch, lversion, lrelease, repoch, rversion, rrelease);
// equal? compare arches too
- if (!compare) {
+ if (!compare) {
int lscore, rscore;
char *eolarch = strchr(larch, '@');
char *eorarch = strchr(rarch, '@');
@@ -1662,7 +1662,7 @@ Pkg_compare_pkg(lpkg, rpkg)
}
if (eolarch) *eolarch = '@';
if (eorarch) *eorarch = '@';
- }
+ }
/* restore info string modified */
if (lpkg->info) {
lrelease[-1] = '-';
@@ -1690,24 +1690,22 @@ Pkg_compare(pkg, evr)
if (!get_e_v_r(pkg, &_epoch, &_version, &_release, &_eos))
croak("undefined package");
- char *epoch = NULL, *version, *release;
+ char *epoch = NULL, *version, *release;
- /* extract epoch and version from evr */
+ /* extract epoch and version from evr */
+ version = evr;
+ while (*version && isdigit(*version)) version++;
+ if (*version == ':') {
+ epoch = evr;
+ *version++ = 0;
+ if (!*epoch) epoch = "0";
+ version[-1] = ':'; /* restore in memory modification */
+ } else {
+ /* there is no epoch defined, so assume epoch = 0 */
version = evr;
- while (*version && isdigit(*version)) version++;
- if (*version == ':') {
- epoch = evr;
- *version++ = 0;
- if (!*epoch) epoch = "0";
- version[-1] = ':'; /* restore in memory modification */
- } else {
- /* there is no epoch defined, so assume epoch = 0 */
- version = evr;
- }
- /* continue extracting release if any */
- if ((release = strrchr(version, '-')) != NULL) {
- *release++ = 0;
- }
+ }
+ if ((release = strrchr(version, '-')) != NULL)
+ *release++ = 0;
repoch = epoch && *epoch ? atoi(epoch) : 0;
RETVAL = compare_evrs(_epoch, _version, _release, repoch, version, release);