rationalize list handling in mutt a bit.
[apps/madmutt.git] / lib-crypt / pgpkey.c
index ae3e49b..d9e2de3 100644 (file)
@@ -758,7 +758,7 @@ BODY *pgp_make_key_attachment (char *tempf)
   return att;
 }
 
   return att;
 }
 
-static LIST *pgp_add_string_to_hints (LIST * hints, const char *str)
+static string_list_t *pgp_add_string_to_hints (string_list_t * hints, const char *str)
 {
   char *scratch;
   char *t;
 {
   char *scratch;
   char *t;
@@ -788,7 +788,7 @@ static pgp_key_t *pgp_get_lastp (pgp_key_t p)
 pgp_key_t pgp_getkeybyaddr (address_t * a, short abilities, pgp_ring_t keyring)
 {
   address_t *r, *p;
 pgp_key_t pgp_getkeybyaddr (address_t * a, short abilities, pgp_ring_t keyring)
 {
   address_t *r, *p;
-  LIST *hints = NULL;
+  string_list_t *hints = NULL;
 
   int weak = 0;
   int invalid = 0;
 
   int weak = 0;
   int invalid = 0;
@@ -812,7 +812,7 @@ pgp_key_t pgp_getkeybyaddr (address_t * a, short abilities, pgp_ring_t keyring)
   mutt_message (_("Looking for keys matching \"%s\"..."), a->mailbox);
   keys = pgp_get_candidates (keyring, hints);
 
   mutt_message (_("Looking for keys matching \"%s\"..."), a->mailbox);
   keys = pgp_get_candidates (keyring, hints);
 
-  mutt_free_list (&hints);
+  string_list_wipe(&hints);
 
   if (!keys)
     return NULL;
 
   if (!keys)
     return NULL;
@@ -860,7 +860,7 @@ pgp_key_t pgp_getkeybyaddr (address_t * a, short abilities, pgp_ring_t keyring)
           this_key_has_weak = 1;
       }
 
           this_key_has_weak = 1;
       }
 
-      address_delete (&r);
+      address_list_wipe(&r);
     }
 
     if (match && !this_key_has_strong && this_key_has_invalid)
     }
 
     if (match && !this_key_has_strong && this_key_has_invalid)
@@ -906,7 +906,7 @@ pgp_key_t pgp_getkeybyaddr (address_t * a, short abilities, pgp_ring_t keyring)
 
 pgp_key_t pgp_getkeybystr (char *p, short abilities, pgp_ring_t keyring)
 {
 
 pgp_key_t pgp_getkeybystr (char *p, short abilities, pgp_ring_t keyring)
 {
-  LIST *hints = NULL;
+  string_list_t *hints = NULL;
   pgp_key_t keys;
   pgp_key_t matches = NULL;
   pgp_key_t *last = &matches;
   pgp_key_t keys;
   pgp_key_t matches = NULL;
   pgp_key_t *last = &matches;
@@ -918,7 +918,7 @@ pgp_key_t pgp_getkeybystr (char *p, short abilities, pgp_ring_t keyring)
 
   hints = pgp_add_string_to_hints (hints, p);
   keys = pgp_get_candidates (keyring, hints);
 
   hints = pgp_add_string_to_hints (hints, p);
   keys = pgp_get_candidates (keyring, hints);
-  mutt_free_list (&hints);
+  string_list_wipe(&hints);
 
   if (!keys)
     return NULL;
 
   if (!keys)
     return NULL;