find_first_merges(): initialize merges variable using initializer

Signed-off-by: Michael Haggerty <mhagger@alum.mit.edu> Signed-off-by: Junio C Hamano <gitster@pobox.com>

Michael Haggerty committed May 25, 2013 at 11:08 UTC 3826902d25febf61274925d6f12cc7471ba3c38f
1 file changed +1 -2
submodule.c
+1 -2
@@ -846,7 +846,7 @@ static int find_first_merges(struct object_array *result, const char *path,
846 struct commit *a, struct commit *b)
847 {
848 int i, j;
849 - struct object_array merges;
849 + struct object_array merges = OBJECT_ARRAY_INIT;
850 struct commit *commit;
851 int contains_another;
852
@@ -856,7 +856,6 @@ static int find_first_merges(struct object_array *result, const char *path,
856 struct rev_info revs;
857 struct setup_revision_opt rev_opts;
858
859 - memset(&merges, 0, sizeof(merges));
859 memset(result, 0, sizeof(struct object_array));
860 memset(&rev_opts, 0, sizeof(rev_opts));
861