Take advantage of pgpPrtParams() directly in pgpsigFormat() extension

- No functional changes, just bypassing an unnecessary round-trip to
  a function really intended for other purposes, now that we can.
This commit is contained in:
Panu Matilainen 2011-11-09 13:28:23 +02:00
parent bbf2f63676
commit 5722245dd8
1 changed files with 3 additions and 4 deletions

View File

@ -423,10 +423,9 @@ static char * pgpsigFormat(rpmtd td)
if (rpmtdType(td) != RPM_BIN_TYPE) {
val = xstrdup(_("(not a blob)"));
} else {
pgpDig dig = NULL;
pgpDigParams sigp = parsePGPSig(td, NULL, NULL, &dig);
pgpDigParams sigp = NULL;
if (sigp == NULL) {
if (pgpPrtParams(td->data, td->count, PGPTAG_SIGNATURE, &sigp)) {
val = xstrdup(_("(not an OpenPGP signature)"));
} else {
char dbuf[BUFSIZ];
@ -449,7 +448,7 @@ static char * pgpsigFormat(rpmtd td)
dbuf, keyid);
free(keyid);
pgpFreeDig(dig);
pgpDigParamsFree(sigp);
}
}