From 7e5043a60e15ae5b6dda36fc587bab1d076f5446 Mon Sep 17 00:00:00 2001 From: Panu Matilainen Date: Wed, 18 Apr 2018 14:16:26 +0300 Subject: [PATCH] Drop unused leadtype argument to applyRetrofits() Since commit 45c2f3ffa63188fbc1289b53ea7cd73551de0509 we haven't been looking at any data from the lead, a fact worth celebrating that went kinda missed back then. --- lib/header_internal.h | 2 +- lib/package.c | 2 +- lib/rpmchecksig.c | 5 ++--- 3 files changed, 4 insertions(+), 5 deletions(-) diff --git a/lib/header_internal.h b/lib/header_internal.h index 81c8c1e9d1..6fcbfaf9bc 100644 --- a/lib/header_internal.h +++ b/lib/header_internal.h @@ -90,7 +90,7 @@ ssize_t Freadall(FD_t fd, void * buf, ssize_t size); RPM_GNUC_INTERNAL void headerMergeLegacySigs(Header h, Header sigh); RPM_GNUC_INTERNAL -void applyRetrofits(Header h, int leadtype); +void applyRetrofits(Header h); RPM_GNUC_INTERNAL int headerIsSourceHeuristic(Header h); #ifdef __cplusplus diff --git a/lib/package.c b/lib/package.c index 08bd74a5f0..bee3866736 100644 --- a/lib/package.c +++ b/lib/package.c @@ -230,7 +230,7 @@ rpmRC rpmReadHeader(rpmts ts, FD_t fd, Header *hdrp, char ** msg) return rc; } -void applyRetrofits(Header h, int leadtype) +void applyRetrofits(Header h) { /* * Make sure that either RPMTAG_SOURCERPM or RPMTAG_SOURCEPACKAGE diff --git a/lib/rpmchecksig.c b/lib/rpmchecksig.c index 6c72611d39..20e9af6d21 100644 --- a/lib/rpmchecksig.c +++ b/lib/rpmchecksig.c @@ -160,7 +160,6 @@ rpmRC rpmpkgRead(struct rpmvs_s *sigset, FD_t fd, char * msg = NULL; rpmRC xx, rc = RPMRC_FAIL; /* assume failure */ int failed = 0; - int leadtype = -1; struct hdrblob_s sigblob, blob; Header h = NULL; Header sigh = NULL; @@ -169,7 +168,7 @@ rpmRC rpmpkgRead(struct rpmvs_s *sigset, FD_t fd, memset(&blob, 0, sizeof(blob)); memset(&sigblob, 0, sizeof(sigblob)); - if ((xx = rpmLeadRead(fd, &leadtype, &msg)) != RPMRC_OK) { + if ((xx = rpmLeadRead(fd, NULL, &msg)) != RPMRC_OK) { /* Avoid message spew on manifests */ if (xx == RPMRC_NOTFOUND) msg = _free(msg); @@ -222,7 +221,7 @@ rpmRC rpmpkgRead(struct rpmvs_s *sigset, FD_t fd, /* Append (and remap) signature tags to the metadata. */ headerMergeLegacySigs(h, sigh); - applyRetrofits(h, leadtype); + applyRetrofits(h); /* Bump reference count for return. */ *hdrp = headerLink(h);