Merge branch 'js/run-process-parallel-api-fix'
authorJunio C Hamano <gitster@pobox.com>
Fri, 11 Aug 2017 20:27:02 +0000 (13:27 -0700)
committerJunio C Hamano <gitster@pobox.com>
Fri, 11 Aug 2017 20:27:02 +0000 (13:27 -0700)
API fix.

* js/run-process-parallel-api-fix:
run_processes_parallel: change confusing task_cb convention

builtin/submodule--helper.c
run-command.c
index af871f14e7b9d453c4d814ea3c7ff8e0a9f5e665..84562ec8337a49c823da6c641d73cd363a972f27 100644 (file)
@@ -930,7 +930,7 @@ static int update_clone_task_finished(int result,
        const struct cache_entry *ce;
        struct submodule_update_clone *suc = suc_cb;
 
-       int *idxP = *(int**)idx_task_cb;
+       int *idxP = idx_task_cb;
        int idx = *idxP;
        free(idxP);
 
index 9e36151bf97d36945ca3464e719687718ee6d1c7..b5e6eb37c0eb3d6ed0cbd4fc35e879bf9fbd3db6 100644 (file)
@@ -1533,7 +1533,7 @@ static int pp_start_one(struct parallel_processes *pp)
        if (start_command(&pp->children[i].process)) {
                code = pp->start_failure(&pp->children[i].err,
                                         pp->data,
-                                        &pp->children[i].data);
+                                        pp->children[i].data);
                strbuf_addbuf(&pp->buffered_output, &pp->children[i].err);
                strbuf_reset(&pp->children[i].err);
                if (code)
@@ -1601,7 +1601,7 @@ static int pp_collect_finished(struct parallel_processes *pp)
 
                code = pp->task_finished(code,
                                         &pp->children[i].err, pp->data,
-                                        &pp->children[i].data);
+                                        pp->children[i].data);
 
                if (code)
                        result = code;