Merge branch 'ta/pretty-parse-config'
[gitweb.git] / submodule.c
index b80ecacf60dc87025336b6b6d6a51acc9321f429..c3a61e70f9f72eced2530d425717972881b947c8 100644 (file)
@@ -544,10 +544,7 @@ static int push_submodule(const char *path)
 int push_unpushed_submodules(unsigned char new_sha1[20], const char *remotes_name)
 {
        int i, ret = 1;
-       struct string_list needs_pushing;
-
-       memset(&needs_pushing, 0, sizeof(struct string_list));
-       needs_pushing.strdup_strings = 1;
+       struct string_list needs_pushing = STRING_LIST_INIT_DUP;
 
        if (!find_unpushed_submodules(new_sha1, remotes_name, &needs_pushing))
                return 1;
@@ -965,7 +962,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))