From b89f167889126991bf0443e2808cb6731a39a615 Mon Sep 17 00:00:00 2001 From: Rafael Garcia-Suarez Date: Wed, 1 Mar 2006 11:44:37 +0000 Subject: Fix a couple of compilation warnings. URPM.xs is now warning-clean. --- URPM.xs | 6 ++++-- 1 file 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 */ -- cgit v1.2.1