Skip to content

Commit

Permalink
find_first_merges(): initialize merges variable using initializer
Browse files Browse the repository at this point in the history
Signed-off-by: Michael Haggerty <mhagger@alum.mit.edu>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
  • Loading branch information
Michael Haggerty authored and Junio C Hamano committed May 28, 2013
1 parent 16aa3bf commit 3826902
Showing 1 changed file with 1 addition and 2 deletions.
3 changes: 1 addition & 2 deletions submodule.c
Original file line number Diff line number Diff line change
Expand Up @@ -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;

Expand All @@ -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));

Expand Down

0 comments on commit 3826902

Please sign in to comment.