summaryrefslogtreecommitdiffstats
path: root/rfc2047.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 /rfc2047.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 'rfc2047.c')
-rw-r--r--rfc2047.c6
1 files changed, 2 insertions, 4 deletions
diff --git a/rfc2047.c b/rfc2047.c
index e8a3e6ed..89cd09ae 100644
--- a/rfc2047.c
+++ b/rfc2047.c
@@ -259,15 +259,13 @@ void rfc2047_encode_adrlist (ADDRESS *addr)
if (ptr->personal)
{
rfc2047_encode_string (buffer, sizeof (buffer), (const unsigned char *)ptr->personal);
- safe_free ((void **) &ptr->personal);
- ptr->personal = safe_strdup (buffer);
+ mutt_str_replace (&ptr->personal, buffer);
}
#ifdef EXACT_ADDRESS
if (ptr->val)
{
rfc2047_encode_string (buffer, sizeof (buffer), (const unsigned char *)ptr->val);
- safe_free ((void **) &ptr->val);
- ptr->val = safe_strdup (buffer);
+ mutt_str_replace (&ptr->val, buffer);
}
#endif
ptr = ptr->next;