Skip to content

Commit 94c0cc8

Browse files
devzero2000gitster
authored andcommitted
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 <[email protected]> Signed-off-by: Junio C Hamano <[email protected]>
1 parent 7fe6834 commit 94c0cc8

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

submodule.c

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -965,7 +965,7 @@ static int find_first_merges(struct object_array *result, const char *path,
965965
sha1_to_hex(a->object.sha1));
966966
init_revisions(&revs, NULL);
967967
rev_opts.submodule = path;
968-
setup_revisions(sizeof(rev_args)/sizeof(char *)-1, rev_args, &revs, &rev_opts);
968+
setup_revisions(ARRAY_SIZE(rev_args)-1, rev_args, &revs, &rev_opts);
969969

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

0 commit comments

Comments
 (0)