]> granicus.if.org Git - neomutt/commitdiff
Boolify pgp_cansign and pgp_canencrypt
authorPietro Cerutti <gahr@gahr.ch>
Mon, 3 Apr 2017 12:15:27 +0000 (12:15 +0000)
committerRichard Russon <rich@flatcap.org>
Sat, 8 Apr 2017 21:26:59 +0000 (22:26 +0100)
Issue: #492

pgplib.c
pgplib.h

index 729905a0a39c05ddcde71727b086cf801bee8aa1..e236a85b29b57a9f2ef11000a39264e9caeefcf0 100644 (file)
--- a/pgplib.c
+++ b/pgplib.c
@@ -50,7 +50,7 @@ const char *pgp_pkalgbytype (unsigned char type)
   }
 }
 
-short pgp_canencrypt (unsigned char type)
+bool pgp_canencrypt (unsigned char type)
 {
   switch (type)
   {
@@ -58,13 +58,13 @@ short pgp_canencrypt (unsigned char type)
   case 2:
   case 16:
   case 20:
-    return 1;
+    return true;
   default:
-    return 0;
+    return false;
   }
 }
 
-short pgp_cansign (unsigned char type)
+bool pgp_cansign (unsigned char type)
 {
   switch (type)
   {
@@ -72,9 +72,9 @@ short pgp_cansign (unsigned char type)
   case 3:
   case 17:
   case 20:
-    return 1;
+    return true;
   default:
-    return 0;
+    return false;
   }
 }
 
index 63d5420ae5b5151bf591cfd5a9785cbb9ab7e719..3eef72e810f6f06e93d1cf0417a04f0fa1261a09 100644 (file)
--- a/pgplib.h
+++ b/pgplib.h
@@ -75,8 +75,8 @@ const char *pgp_pkalgbytype(unsigned char type);
 pgp_key_t pgp_remove_key(pgp_key_t *klist, pgp_key_t key);
 pgp_uid_t *pgp_copy_uids(pgp_uid_t *up, pgp_key_t parent);
 
-short pgp_canencrypt(unsigned char type);
-short pgp_cansign(unsigned char type);
+bool pgp_canencrypt(unsigned char type);
+bool pgp_cansign(unsigned char type);
 short pgp_get_abilities(unsigned char type);
 
 void pgp_free_key(pgp_key_t *kpp);