summaryrefslogtreecommitdiff
path: root/submodule.c
diff options
context:
space:
mode:
authorMichael Haggerty <mhagger@alum.mit.edu>2013-05-25 11:08:12 +0200
committerJunio C Hamano <gitster@pobox.com>2013-05-28 09:25:01 -0700
commit3826902d25febf61274925d6f12cc7471ba3c38f (patch)
tree35443afaf01261b7398d436dee6c2a374bbca6fb /submodule.c
parent16aa3bfc9b9dc587d02f29d8e54810480cf955e4 (diff)
downloadgit-3826902d25febf61274925d6f12cc7471ba3c38f.tar.gz
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>
Diffstat (limited to 'submodule.c')
-rw-r--r--submodule.c3
1 files changed, 1 insertions, 2 deletions
diff --git a/submodule.c b/submodule.c
index e728025f60..b837c04ee2 100644
--- a/submodule.c
+++ b/submodule.c
@@ -846,7 +846,7 @@ static int find_first_merges(struct object_array *result, const char *path,
struct commit *a, struct commit *b)
{
int i, j;
- struct object_array merges;
+ struct object_array merges = OBJECT_ARRAY_INIT;
struct commit *commit;
int contains_another;
@@ -856,7 +856,6 @@ static int find_first_merges(struct object_array *result, const char *path,
struct rev_info revs;
struct setup_revision_opt rev_opts;
- memset(&merges, 0, sizeof(merges));
memset(result, 0, sizeof(struct object_array));
memset(&rev_opts, 0, sizeof(rev_opts));