summaryrefslogtreecommitdiff
path: root/lib/package.c
diff options
context:
space:
mode:
authorjbj <devnull@localhost>2000-11-07 13:16:43 +0000
committerjbj <devnull@localhost>2000-11-07 13:16:43 +0000
commit636e4b37718ea8f87fcf29f934aa0a03e9bfcc69 (patch)
treedacb8a92f1982cad14d08db959bbe97d92a5a7da /lib/package.c
parent62c5a919309223a72c05bbcd2e26559bce67def1 (diff)
downloadlibrpm-tizen-636e4b37718ea8f87fcf29f934aa0a03e9bfcc69.tar.gz
librpm-tizen-636e4b37718ea8f87fcf29f934aa0a03e9bfcc69.tar.bz2
librpm-tizen-636e4b37718ea8f87fcf29f934aa0a03e9bfcc69.zip
- load headers as single contiguous region.
CVS patchset: 4244 CVS date: 2000/11/07 13:16:43
Diffstat (limited to 'lib/package.c')
-rw-r--r--lib/package.c9
1 files changed, 3 insertions, 6 deletions
diff --git a/lib/package.c b/lib/package.c
index c7f03308f..d9400146b 100644
--- a/lib/package.c
+++ b/lib/package.c
@@ -48,9 +48,8 @@ static int readPackageHeaders(FD_t fd, /*@out@*/ struct rpmlead * leadPtr,
/* if fd points to a socket, pipe, etc, sb.st_size is *always* zero */
if (S_ISREG(sb.st_mode) && sb.st_size < sizeof(*lead)) return 1;
- if (readLead(fd, lead)) {
+ if (readLead(fd, lead))
return 2;
- }
if (lead->magic[0] != RPMLEAD_MAGIC0 || lead->magic[1] != RPMLEAD_MAGIC1 ||
lead->magic[2] != RPMLEAD_MAGIC2 || lead->magic[3] != RPMLEAD_MAGIC3) {
@@ -66,15 +65,13 @@ static int readPackageHeaders(FD_t fd, /*@out@*/ struct rpmlead * leadPtr,
case 2:
case 3:
case 4:
- if (rpmReadSignature(fd, sigs, lead->signature_type)) {
+ if (rpmReadSignature(fd, sigs, lead->signature_type))
return 2;
- }
*hdr = headerRead(fd, (lead->major >= 3) ?
HEADER_MAGIC_YES : HEADER_MAGIC_NO);
if (*hdr == NULL) {
- if (sigs != NULL) {
+ if (sigs != NULL)
headerFree(*sigs);
- }
return 2;
}