aboutsummaryrefslogtreecommitdiff
path: root/docs/code
diff options
context:
space:
mode:
authorMasterDuke17 <MasterDuke17@users.noreply.github.com>2020-05-06 20:52:11 +0100
committercjihrig <cjihrig@gmail.com>2020-05-17 09:22:00 -0400
commit5a0779ba32eeffde8452c37a2cf29edef9b47247 (patch)
tree176028a58517fd3775f3317bc9ab435c32bb1ae5 /docs/code
parentb4fe4f6ad91d380c6af2b4ab2a1c624e58947608 (diff)
downloadlibuv-5a0779ba32eeffde8452c37a2cf29edef9b47247.tar.gz
libuv-5a0779ba32eeffde8452c37a2cf29edef9b47247.zip
doc: fix the order of arguments to calloc()
PR-URL: https://github.com/libuv/libuv/pull/2835 Reviewed-By: Colin Ihrig <cjihrig@gmail.com>
Diffstat (limited to 'docs/code')
-rw-r--r--docs/code/multi-echo-server/main.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/docs/code/multi-echo-server/main.c b/docs/code/multi-echo-server/main.c
index 25f49612..b938a7da 100644
--- a/docs/code/multi-echo-server/main.c
+++ b/docs/code/multi-echo-server/main.c
@@ -70,7 +70,7 @@ void setup_workers() {
child_worker_count = cpu_count;
- workers = calloc(sizeof(struct child_worker), cpu_count);
+ workers = calloc(cpu_count, sizeof(struct child_worker));
while (cpu_count--) {
struct child_worker *worker = &workers[cpu_count];
uv_pipe_init(loop, &worker->pipe, 1);