Skip to content

Commit

Permalink
submodule.c: use the ARRAY_SIZE macro
Browse files Browse the repository at this point in the history
Use the ARRAY_SIZE macro to get the number
of elements in an array.

Signed-off-by: Elia Pinto <gitter.spiros@gmail.com>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
  • Loading branch information
Elia Pinto authored and Junio C Hamano committed Jun 30, 2014
1 parent 7fe6834 commit 94c0cc8
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion submodule.c
Original file line number Diff line number Diff line change
Expand Up @@ -965,7 +965,7 @@ static int find_first_merges(struct object_array *result, const char *path,
sha1_to_hex(a->object.sha1));
init_revisions(&revs, NULL);
rev_opts.submodule = path;
setup_revisions(sizeof(rev_args)/sizeof(char *)-1, rev_args, &revs, &rev_opts);
setup_revisions(ARRAY_SIZE(rev_args)-1, rev_args, &revs, &rev_opts);

/* save all revisions from the above list that contain b */
if (prepare_revision_walk(&revs))
Expand Down

0 comments on commit 94c0cc8

Please sign in to comment.