diff options
author | Thomas Roessler <roessler@does-not-exist.org> | 2000-01-10 10:35:48 +0000 |
---|---|---|
committer | Thomas Roessler <roessler@does-not-exist.org> | 2000-01-10 10:35:48 +0000 |
commit | 544e8ba393e9c1ca55b120f209383742211007c8 (patch) | |
tree | 5157baa0f2071aa0763254491475416832cdf991 /postpone.c | |
parent | c8e19c984e900ede0f0c09353a96c62a6aa81445 (diff) |
Add (and use) a function mutt_str_replace, which essentially
replaces the sequence:
safe_free (&s);
s = safe_strdup (t);
Diffstat (limited to 'postpone.c')
-rw-r--r-- | postpone.c | 13 |
1 files changed, 3 insertions, 10 deletions
@@ -482,17 +482,11 @@ int mutt_parse_pgp_hdr (char *p, int set_signas) } if (set_signas || *pgp_sign_as) - { - safe_free((void **) &PgpSignAs); - PgpSignAs = safe_strdup(pgp_sign_as); - } + mutt_str_replace (&PgpSignAs, pgp_sign_as); /* the micalg field must not be empty */ if (set_signas && *pgp_sign_micalg) - { - safe_free((void **) &PgpSignMicalg); - PgpSignMicalg = safe_strdup(pgp_sign_micalg); - } + mutt_str_replace (&PgpSignMicalg, pgp_sign_micalg); return pgp; } @@ -624,8 +618,7 @@ int mutt_prepare_template (FILE *fp, CONTEXT *ctx, HEADER *newhdr, HEADER *hdr, return -1; } - safe_free ((void *) &b->filename); - b->filename = safe_strdup (file); + mutt_str_replace (&b->filename, file); b->unlink = 1; if (mutt_is_text_type (b->type, b->subtype)) |