Initialize sort_uniq_list using named constant
authorMichael Haggerty <mhagger@alum.mit.edu>
Sun, 4 Nov 2012 07:07:07 +0000 (08:07 +0100)
committerJeff King <peff@peff.net>
Thu, 8 Nov 2012 16:34:22 +0000 (11:34 -0500)
Signed-off-by: Michael Haggerty <mhagger@alum.mit.edu>
Acked-by: Johan Herland <johan@herland.net>
Signed-off-by: Jeff King <peff@peff.net>
notes.c

diff --git a/notes.c b/notes.c
index bc454e1eab2b0e1d264cee7bb1f84bdb3bb14237..8652f8fcf384a1d981a9d9714f46db40308c2112 100644 (file)
--- a/notes.c
+++ b/notes.c
@@ -901,7 +901,7 @@ static int string_list_join_lines_helper(struct string_list_item *item,
 int combine_notes_cat_sort_uniq(unsigned char *cur_sha1,
                const unsigned char *new_sha1)
 {
-       struct string_list sort_uniq_list = { NULL, 0, 0, 1 };
+       struct string_list sort_uniq_list = STRING_LIST_INIT_DUP;
        struct strbuf buf = STRBUF_INIT;
        int ret = 1;