]> git.ipfire.org Git - thirdparty/git.git/blobdiff - promisor-remote.c
chainlint.pl: add parser to validate tests
[thirdparty/git.git] / promisor-remote.c
index db2ebdc66ef2fe465456e39c4d33c6e5f6bd36de..68f46f5ec70b93b28fa7c75988d671a4046e8fee 100644 (file)
@@ -22,7 +22,7 @@ static int fetch_objects(struct repository *repo,
        child.git_cmd = 1;
        child.in = -1;
        if (repo != the_repository)
-               prepare_other_repo_env(&child.env_array, repo->gitdir);
+               prepare_other_repo_env(&child.env, repo->gitdir);
        strvec_pushl(&child.args, "-c", "fetch.negotiationAlgorithm=noop",
                     "fetch", remote_name, "--no-tags",
                     "--no-write-fetch-head", "--recurse-submodules=no",
@@ -84,7 +84,7 @@ static void promisor_remote_move_to_tail(struct promisor_remote_config *config,
                                         struct promisor_remote *r,
                                         struct promisor_remote *previous)
 {
-       if (r->next == NULL)
+       if (!r->next)
                return;
 
        if (previous)
@@ -146,7 +146,7 @@ static void promisor_remote_init(struct repository *r)
        if (r->promisor_remote_config)
                return;
        config = r->promisor_remote_config =
-               xcalloc(sizeof(*r->promisor_remote_config), 1);
+               xcalloc(1, sizeof(*r->promisor_remote_config));
        config->promisors_tail = &config->promisors;
 
        repo_config(r, promisor_remote_config, config);