diff options
author | Panu Matilainen <pmatilai@redhat.com> | 2017-04-04 15:08:20 +0300 |
---|---|---|
committer | Panu Matilainen <pmatilai@redhat.com> | 2017-04-04 15:08:20 +0300 |
commit | 7672ce08685b41470673cf1ca8678f47ff7a59ed (patch) | |
tree | 04df9891fc9ae1729d68ab88480d23bb8e7e8020 | |
parent | 7ba0b8ff6f92a5658ac465d2057f0f28f4a61856 (diff) | |
download | rpm-7672ce08685b41470673cf1ca8678f47ff7a59ed.tar.gz |
File signature length is not needed if not retrieving file signatures
...and move the initialization next to the file signature init
where it logically belongs.
-rw-r--r-- | lib/rpmfi.c | 3 |
1 files changed, 1 insertions, 2 deletions
diff --git a/lib/rpmfi.c b/lib/rpmfi.c index c2cfa5573..e5a1114a5 100644 --- a/lib/rpmfi.c +++ b/lib/rpmfi.c @@ -1470,8 +1470,6 @@ static int rpmfilesPopulate(rpmfiles fi, Header h, rpmfiFlags flags) } } - fi->signaturelength = headerGetNumber(h, RPMTAG_FILESIGNATURELENGTH); - fi->digests = NULL; /* grab hex digests from header and store in binary format */ if (!(flags & RPMFI_NOFILEDIGESTS) && @@ -1502,6 +1500,7 @@ static int rpmfilesPopulate(rpmfiles fi, Header h, rpmfiFlags flags) if (rpmtdCount(&fsignatures) != totalfc) goto err; fi->signatures = t = xmalloc(rpmtdCount(&fsignatures) * fi->signaturelength); + fi->signaturelength = headerGetNumber(h, RPMTAG_FILESIGNATURELENGTH); while ((fsignature = rpmtdNextString(&fsignatures))) { if (*fsignature == '\0') { |