summaryrefslogtreecommitdiff
path: root/lib/rpmchecksig.c
diff options
context:
space:
mode:
authorPanu Matilainen <pmatilai@redhat.com>2009-05-20 17:22:51 +0300
committerPanu Matilainen <pmatilai@redhat.com>2009-05-20 17:22:51 +0300
commit44cd276bc2bec0bbb3a177b845b3a02d00732506 (patch)
tree71c4b0d3d4a415118033b5d92fe77f4545ac2928 /lib/rpmchecksig.c
parent9acfa19a0da514f64f17cb4e76603ed48ec8db1d (diff)
downloadrpm-44cd276bc2bec0bbb3a177b845b3a02d00732506.tar.gz
rpm-44cd276bc2bec0bbb3a177b845b3a02d00732506.tar.bz2
rpm-44cd276bc2bec0bbb3a177b845b3a02d00732506.zip
Eliminate useless pgpDig nbytes counter
- nothing at all uses this, dont bother - if plaintext size of digests is needed, the correct place to calculate it is in the digest routines, not manual beancounting all over the place
Diffstat (limited to 'lib/rpmchecksig.c')
-rw-r--r--lib/rpmchecksig.c6
1 files changed, 1 insertions, 5 deletions
diff --git a/lib/rpmchecksig.c b/lib/rpmchecksig.c
index eb807db07..b8660e6e1 100644
--- a/lib/rpmchecksig.c
+++ b/lib/rpmchecksig.c
@@ -459,15 +459,12 @@ static int readFile(FD_t fd, const char * fn, pgpDig dig,
int rc = 1;
Header h = NULL;
- dig->nbytes = 0;
/* Read the header from the package. */
if ((h = headerRead(fd, HEADER_MAGIC_YES)) == NULL) {
rpmlog(RPMLOG_ERR, _("%s: headerRead failed\n"), fn);
goto exit;
}
- dig->nbytes += headerSizeof(h, HEADER_MAGIC_YES);
-
if (headerIsEntry(h, RPMTAG_HEADERIMMUTABLE)) {
struct rpmtd_s utd;
@@ -483,8 +480,7 @@ static int readFile(FD_t fd, const char * fn, pgpDig dig,
}
/* Read the payload from the package. */
- while ((count = Fread(buf, sizeof(buf[0]), sizeof(buf), fd)) > 0)
- dig->nbytes += count;
+ while ((count = Fread(buf, sizeof(buf[0]), sizeof(buf), fd)) > 0) {}
if (count < 0) {
rpmlog(RPMLOG_ERR, _("%s: Fread failed: %s\n"), fn, Fstrerror(fd));
goto exit;