diff options
author | Junio C Hamano <gitster@pobox.com> | 2016-08-12 09:47:36 -0700 |
---|---|---|
committer | Junio C Hamano <gitster@pobox.com> | 2016-08-12 09:47:36 -0700 |
commit | 8a5ad2ba5bacd84c10ec62b0cf5a67d0f147746e (patch) | |
tree | 01457c5fb2c0cc3ebb30966eadd138e1eb5117ba /merge-recursive.c | |
parent | b32d7c524b2a0e404c297609aea6ec1cf9f889fe (diff) | |
parent | af4941d444f8bbbc02f68472f4cd6d5846ee043c (diff) | |
download | git-8a5ad2ba5bacd84c10ec62b0cf5a67d0f147746e.tar.gz |
Merge branch 'rs/merge-recursive-string-list-init'
A small code clean-up.
* rs/merge-recursive-string-list-init:
merge-recursive: use STRING_LIST_INIT_NODUP
Diffstat (limited to 'merge-recursive.c')
-rw-r--r-- | merge-recursive.c | 3 |
1 files changed, 1 insertions, 2 deletions
diff --git a/merge-recursive.c b/merge-recursive.c index c9e4dbc349..e5243c2b76 100644 --- a/merge-recursive.c +++ b/merge-recursive.c @@ -436,7 +436,7 @@ static void record_df_conflict_files(struct merge_options *o, * and the file need to be present, then the D/F file will be * reinstated with a new unique name at the time it is processed. */ - struct string_list df_sorted_entries; + struct string_list df_sorted_entries = STRING_LIST_INIT_NODUP; const char *last_file = NULL; int last_len = 0; int i; @@ -449,7 +449,6 @@ static void record_df_conflict_files(struct merge_options *o, return; /* Ensure D/F conflicts are adjacent in the entries list. */ - memset(&df_sorted_entries, 0, sizeof(struct string_list)); for (i = 0; i < entries->nr; i++) { struct string_list_item *next = &entries->items[i]; string_list_append(&df_sorted_entries, next->string)->util = |