summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorJunio C Hamano <gitster@pobox.com>2016-09-08 21:35:59 -0700
committerJunio C Hamano <gitster@pobox.com>2016-09-08 21:35:59 -0700
commitf14883b972f3d6b104c4d141fc3de34af9ba0b24 (patch)
treef745b382d02a707139c806197c9dd932e35853e2
parent24c88ad8d10c36f4cd2473e6199f901ac485d74e (diff)
parentaf4941d444f8bbbc02f68472f4cd6d5846ee043c (diff)
downloadgit-f14883b972f3d6b104c4d141fc3de34af9ba0b24.tar.gz
Merge branch 'rs/merge-recursive-string-list-init' into maint
A small code clean-up. * rs/merge-recursive-string-list-init: merge-recursive: use STRING_LIST_INIT_NODUP
-rw-r--r--merge-recursive.c3
1 files changed, 1 insertions, 2 deletions
diff --git a/merge-recursive.c b/merge-recursive.c
index e7178bcdcc..a52139eada 100644
--- a/merge-recursive.c
+++ b/merge-recursive.c
@@ -406,7 +406,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;
@@ -419,7 +419,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 =