aboutsummaryrefslogtreecommitdiffstats
path: root/URPM.xs
diff options
context:
space:
mode:
authorRafael Garcia-Suarez <rgarciasuarez@mandriva.org>2006-03-01 11:44:37 +0000
committerRafael Garcia-Suarez <rgarciasuarez@mandriva.org>2006-03-01 11:44:37 +0000
commitb89f167889126991bf0443e2808cb6731a39a615 (patch)
tree2e303ae2035bccd006cbe90b2490c0be82fba685 /URPM.xs
parent49f2d674a7c0776aacb984b1de68eb85c4602960 (diff)
downloadperl-URPM-b89f167889126991bf0443e2808cb6731a39a615.tar
perl-URPM-b89f167889126991bf0443e2808cb6731a39a615.tar.gz
perl-URPM-b89f167889126991bf0443e2808cb6731a39a615.tar.bz2
perl-URPM-b89f167889126991bf0443e2808cb6731a39a615.tar.xz
perl-URPM-b89f167889126991bf0443e2808cb6731a39a615.zip
Fix a couple of compilation warnings. URPM.xs is now warning-clean.
Diffstat (limited to 'URPM.xs')
-rw-r--r--URPM.xs6
1 files changed, 4 insertions, 2 deletions
diff --git a/URPM.xs b/URPM.xs
index 07e1f2a..2b580cd 100644
--- a/URPM.xs
+++ b/URPM.xs
@@ -3350,7 +3350,7 @@ Urpm_verify_rpm(filename, ...)
int i;
char * fmtsig = NULL;
char buffer[8192];
- rpmts ts;
+ rpmts ts = NULL;
CODE:
for (i = 1; i < items-1; i+=2) {
STRLEN len;
@@ -3441,7 +3441,7 @@ Urpm_verify_rpm(filename, ...)
}
}
- if (!db)
+ if (!db && ts)
ts = rpmtsFree(ts);
else
/* Restoring verification flag to the ts */
@@ -3508,6 +3508,8 @@ Urpm_import_pubkey(...)
blen = block_len;
b = memcpy(malloc(blen+1), block, blen+1); /* XXX should use xmalloc instead */
rc = 0;
+ } else {
+ rc = 0;
}
if (rc || b == NULL || blen <= 0) {
/* error reading file, or no file or block */