]> granicus.if.org Git - neomutt/commitdiff
crypt_is_numerical_keyid
authorRichard Russon <rich@flatcap.org>
Tue, 11 Apr 2017 11:57:58 +0000 (12:57 +0100)
committerRichard Russon <rich@flatcap.org>
Tue, 11 Apr 2017 23:29:59 +0000 (00:29 +0100)
crypt.c
mutt_crypt.h

diff --git a/crypt.c b/crypt.c
index a740e84754b48a2106dd9467295397e37ad1b903..aa5e77fb2eccc3ce6815448f8dabfc42f31f70ef 100644 (file)
--- a/crypt.c
+++ b/crypt.c
@@ -1115,18 +1115,18 @@ const char* crypt_get_fingerprint_or_id (char *p, const char **pphint,
  * Used by pgp_find_keys and find_keys to check if a crypt-hook
  * value is a key id.
  */
-short crypt_is_numerical_keyid (const char *s)
+bool crypt_is_numerical_keyid (const char *s)
 {
   /* or should we require the "0x"? */
   if (strncmp (s, "0x", 2) == 0)
     s += 2;
   if (strlen (s) % 8)
-    return 0;
+    return false;
   while (*s)
     if (strchr ("0123456789ABCDEFabcdef", *s++) == NULL)
-      return 0;
+      return false;
 
-  return 1;
+  return true;
 }
 
 
index 7d36c17189ac39ecb34946922922f492d95e72f4..2ebe30c10c4a87038135585b4a4eb6b3bd2646c8 100644 (file)
@@ -177,7 +177,7 @@ const char *crypt_get_fingerprint_or_id(char *p, const char **pphint,
                                         const char **ppl, const char **pps);
 
 /* Check if a string contains a numerical key */
-short crypt_is_numerical_keyid(const char *s);
+bool crypt_is_numerical_keyid(const char *s);