From: jacob Date: Fri, 6 Aug 2004 00:31:35 +0000 (+0000) Subject: dup_word_list() does the right thing if passed NULL (on general principles) X-Git-Url: https://git.distorted.org.uk/~mdw/sgt/halibut/commitdiff_plain/8ff28c12948b3528cc023a0304a0d39feca78e3e dup_word_list() does the right thing if passed NULL (on general principles) git-svn-id: svn://svn.tartarus.org/sgt/halibut@4410 cda61777-01e9-0310-a592-d414129be87e --- diff --git a/malloc.c b/malloc.c index 6612fef..2ff22fd 100644 --- a/malloc.c +++ b/malloc.c @@ -101,7 +101,7 @@ char *dupstr(char *s) { * Duplicate a linked list of words */ word *dup_word_list(word *w) { - word *head, **eptr = &head; + word *head = NULL, **eptr = &head; while (w) { word *newwd = snew(word);