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 <gitter.spiros@gmail.com> Signed-off-by: Junio C Hamano <gitster@pobox.com>
Elia Pinto committed
Jun 27, 2014 at 05:11 UTC
94c0cc8f72835abe59fdcce34d8401a7c54a2af7
1 file changed
+1
-1
submodule.c
+1
-1
@@ -965,7 +965,7 @@ static int find_first_merges(struct object_array *result, const char *path,
965
sha1_to_hex(a->object.sha1));
966
init_revisions(&revs, NULL);
967
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);
969
970
/* save all revisions from the above list that contain b */
971
if (prepare_revision_walk(&revs))