From ed38c637ad88f34fa8c55def6e77eb9d8d42555d Mon Sep 17 00:00:00 2001 From: David Champion Date: Tue, 30 Aug 2016 16:30:06 -0700 Subject: [PATCH] Moves mutt_copy_list to muttlib.c, where it belongs. --- muttlib.c | 20 ++++++++++++++++++++ send.c | 20 -------------------- 2 files changed, 20 insertions(+), 20 deletions(-) diff --git a/muttlib.c b/muttlib.c index 209c7ab9..4c504b22 100644 --- a/muttlib.c +++ b/muttlib.c @@ -311,6 +311,26 @@ void mutt_free_list (LIST **list) } } +LIST *mutt_copy_list (LIST *p) +{ + LIST *t, *r=NULL, *l=NULL; + + for (; p; p = p->next) + { + t = (LIST *) safe_malloc (sizeof (LIST)); + t->data = safe_strdup (p->data); + t->next = NULL; + if (l) + { + r->next = t; + r = r->next; + } + else + l = r = t; + } + return (l); +} + HEADER *mutt_dup_header(HEADER *h) { HEADER *hnew; diff --git a/send.c b/send.c index e206bad0..8423934d 100644 --- a/send.c +++ b/send.c @@ -324,26 +324,6 @@ static void process_user_header (ENVELOPE *env) } } -LIST *mutt_copy_list (LIST *p) -{ - LIST *t, *r=NULL, *l=NULL; - - for (; p; p = p->next) - { - t = (LIST *) safe_malloc (sizeof (LIST)); - t->data = safe_strdup (p->data); - t->next = NULL; - if (l) - { - r->next = t; - r = r->next; - } - else - l = r = t; - } - return (l); -} - void mutt_forward_intro (FILE *fp, HEADER *cur) { char buffer[STRING]; -- 2.40.0