Skip to content

Commit

Permalink
Drop unused leadtype argument to applyRetrofits()
Browse files Browse the repository at this point in the history
Since commit 45c2f3f we haven't been
looking at any data from the lead, a fact worth celebrating that went
kinda missed back then.
  • Loading branch information
pmatilai committed Apr 18, 2018
1 parent 1af9235 commit 7e5043a
Show file tree
Hide file tree
Showing 3 changed files with 4 additions and 5 deletions.
2 changes: 1 addition & 1 deletion lib/header_internal.h
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down
2 changes: 1 addition & 1 deletion lib/package.c
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down
5 changes: 2 additions & 3 deletions lib/rpmchecksig.c
Original file line number Diff line number Diff line change
Expand Up @@ -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;
Expand All @@ -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);
Expand Down Expand Up @@ -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);
Expand Down

0 comments on commit 7e5043a

Please sign in to comment.