aboutsummaryrefslogtreecommitdiffstats
path: root/agent/call-pinentry.c
diff options
context:
space:
mode:
authorWerner Koch <[email protected]>2013-03-20 09:00:12 +0000
committerWerner Koch <[email protected]>2013-03-20 09:00:12 +0000
commiteaa6dc3a8b4f31525650cd4785d6bafab86d68b7 (patch)
tree6552e846c825e2dae78d5ceefebee0e2acaeb27f /agent/call-pinentry.c
parentAdd code to allow for late memory cleanup. (diff)
parentgpg: Print indicator for unknown key capability. (diff)
downloadgnupg-key-storage-work.tar.gz
gnupg-key-storage-work.zip
Merge branch 'master' into key-storage-workkey-storage-work
--
Diffstat (limited to 'agent/call-pinentry.c')
-rw-r--r--agent/call-pinentry.c9
1 files changed, 3 insertions, 6 deletions
diff --git a/agent/call-pinentry.c b/agent/call-pinentry.c
index c6b6b5282..78e1c1106 100644
--- a/agent/call-pinentry.c
+++ b/agent/call-pinentry.c
@@ -596,18 +596,15 @@ static gpg_error_t
inq_quality (void *opaque, const char *line)
{
assuan_context_t ctx = opaque;
+ const char *s;
char *pin;
int rc;
int percent;
char numbuf[20];
- if (!strncmp (line, "QUALITY", 7) && (line[7] == ' ' || !line[7]))
+ if ((s = has_leading_keyword (line, "QUALITY")))
{
- line += 7;
- while (*line == ' ')
- line++;
-
- pin = unescape_passphrase_string (line);
+ pin = unescape_passphrase_string (s);
if (!pin)
rc = gpg_error_from_syserror ();
else