summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorJacob Nevins <jacobn@chiark.greenend.org.uk>2004-08-06 00:31:35 +0000
committerJacob Nevins <jacobn@chiark.greenend.org.uk>2004-08-06 00:31:35 +0000
commita4baf2e856ebac06b56b62f46cde5d88229f0974 (patch)
tree776163963020ecf9e61e8315a18343f8bbae8cc5
parentdac8f2ae8dda37f1bbb384fef0c1680c0a26eb41 (diff)
downloadhalibut-a4baf2e856ebac06b56b62f46cde5d88229f0974.zip
halibut-a4baf2e856ebac06b56b62f46cde5d88229f0974.tar.gz
halibut-a4baf2e856ebac06b56b62f46cde5d88229f0974.tar.bz2
halibut-a4baf2e856ebac06b56b62f46cde5d88229f0974.tar.xz
dup_word_list() does the right thing if passed NULL (on general principles)
[originally from svn r4410]
-rw-r--r--malloc.c2
1 files changed, 1 insertions, 1 deletions
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);