summaryrefslogtreecommitdiffstats
path: root/pgpkey.c
diff options
context:
space:
mode:
authorThomas Roessler <roessler@does-not-exist.org>2000-01-10 10:35:48 +0000
committerThomas Roessler <roessler@does-not-exist.org>2000-01-10 10:35:48 +0000
commit544e8ba393e9c1ca55b120f209383742211007c8 (patch)
tree5157baa0f2071aa0763254491475416832cdf991 /pgpkey.c
parentc8e19c984e900ede0f0c09353a96c62a6aa81445 (diff)
Add (and use) a function mutt_str_replace, which essentially
replaces the sequence: safe_free (&s); s = safe_strdup (t);
Diffstat (limited to 'pgpkey.c')
-rw-r--r--pgpkey.c5
1 files changed, 1 insertions, 4 deletions
diff --git a/pgpkey.c b/pgpkey.c
index d2fd5503..c9b28df5 100644
--- a/pgpkey.c
+++ b/pgpkey.c
@@ -618,10 +618,7 @@ pgp_key_t *pgp_ask_for_key (char *tag, char *whatfor,
if (whatfor)
{
if (l)
- {
- safe_free ((void **) &l->dflt);
- l->dflt = safe_strdup (resp);
- }
+ mutt_str_replace (&l->dflt, resp);
else
{
l = safe_malloc (sizeof (struct pgp_cache));