From: Elia Pinto Date: Fri, 27 Jun 2014 12:11:39 +0000 (-0700) Subject: submodule.c: use the ARRAY_SIZE macro X-Git-Tag: v2.1.0-rc0~41^2 X-Git-Url: https://granicus.if.org/sourcecode?a=commitdiff_plain;h=94c0cc8f72835abe59fdcce34d8401a7c54a2af7;p=git submodule.c: use the ARRAY_SIZE macro Use the ARRAY_SIZE macro to get the number of elements in an array. Signed-off-by: Elia Pinto Signed-off-by: Junio C Hamano --- diff --git a/submodule.c b/submodule.c index b80ecacf60..48e3b44e21 100644 --- a/submodule.c +++ b/submodule.c @@ -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))