summaryrefslogtreecommitdiff
path: root/submodule.c
diff options
context:
space:
mode:
authorElia Pinto <gitter.spiros@gmail.com>2014-06-27 12:11:39 (GMT)
committerJunio C Hamano <gitster@pobox.com>2014-06-30 20:39:23 (GMT)
commit94c0cc8f72835abe59fdcce34d8401a7c54a2af7 (patch)
tree69b32b939ba8cdc7a8883af37e3d5ffce11b7032 /submodule.c
parent7fe683480124239ec0ab555c9b529e4c54707d7b (diff)
downloadgit-94c0cc8f72835abe59fdcce34d8401a7c54a2af7.zip
git-94c0cc8f72835abe59fdcce34d8401a7c54a2af7.tar.gz
git-94c0cc8f72835abe59fdcce34d8401a7c54a2af7.tar.bz2
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>
Diffstat (limited to 'submodule.c')
-rw-r--r--submodule.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/submodule.c b/submodule.c
index b80ecac..48e3b44 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))