]> granicus.if.org Git - neomutt/commitdiff
pgp_use_gpg_agent
authorRichard Russon <rich@flatcap.org>
Mon, 10 Apr 2017 21:18:59 +0000 (22:18 +0100)
committerRichard Russon <rich@flatcap.org>
Tue, 11 Apr 2017 23:29:59 +0000 (00:29 +0100)
pgp.c
pgp.h

diff --git a/pgp.c b/pgp.c
index 8a91b6480ed9bc5e55d1ca303f016a1b1a339016..eb723e6a4d173a461ba8c772f865987f4ea35580 100644 (file)
--- a/pgp.c
+++ b/pgp.c
@@ -95,18 +95,18 @@ int pgp_valid_passphrase (void)
   return 0;
 }
 
-int pgp_use_gpg_agent (void)
+bool pgp_use_gpg_agent (void)
 {
   char *tty = NULL;
 
   /* GnuPG 2.1 no longer exports GPG_AGENT_INFO */
   if (!option (OPTUSEGPGAGENT))
-    return 0;
+    return false;
 
   if ((tty = ttyname(0)))
     setenv("GPG_TTY", tty, 0);
 
-  return 1;
+  return true;
 }
 
 static pgp_key_t _pgp_parent(pgp_key_t k)
diff --git a/pgp.h b/pgp.h
index 5236bf692d5e82a90af6fbf59a0f924bdbe5cfc0..e3942fbc11e55c9bb465bba7601d88227487b732 100644 (file)
--- a/pgp.h
+++ b/pgp.h
@@ -28,7 +28,7 @@
 
 /* prototypes */
 
-int pgp_use_gpg_agent(void);
+bool pgp_use_gpg_agent(void);
 
 int pgp_check_traditional(FILE *fp, BODY *b, int tagged_only);
 BODY *pgp_make_key_attachment(char *tempf);