diff options
Diffstat (limited to 'string-list.c')
-rw-r--r-- | string-list.c | 12 |
1 files changed, 9 insertions, 3 deletions
diff --git a/string-list.c b/string-list.c index a917955fbd..549fc416d6 100644 --- a/string-list.c +++ b/string-list.c @@ -1,10 +1,16 @@ #include "cache.h" #include "string-list.h" -void string_list_init(struct string_list *list, int strdup_strings) +void string_list_init_nodup(struct string_list *list) { - memset(list, 0, sizeof(*list)); - list->strdup_strings = strdup_strings; + struct string_list blank = STRING_LIST_INIT_NODUP; + memcpy(list, &blank, sizeof(*list)); +} + +void string_list_init_dup(struct string_list *list) +{ + struct string_list blank = STRING_LIST_INIT_DUP; + memcpy(list, &blank, sizeof(*list)); } /* if there is no exact match, point to the index where the entry could be |