agent: simplify agent_get_passphrase.

* agent/call-pinentry.c (agent_get_passphrase): Simplify.
This commit is contained in:
NIIBE Yutaka 2015-10-09 11:55:18 +09:00
parent 818fa4f71e
commit 5a12c45666
1 changed files with 2 additions and 8 deletions

View File

@ -1064,15 +1064,9 @@ agent_get_passphrase (ctrl_t ctrl,
{
size_t size;
size_t len = ASSUAN_LINELENGTH/2;
unsigned char *buffer;
rc = pinentry_loopback(ctrl, "PASSPHRASE", &buffer, &size, len);
if (!rc)
{
buffer[size] = 0;
*retpass = buffer;
}
return rc;
return pinentry_loopback (ctrl, "PASSPHRASE",
(unsigned char **)retpass, &size, len);
}
return gpg_error (GPG_ERR_NO_PIN_ENTRY);
}