From 88c010725329a32ade46e9f9e4245f0b79e161ed Mon Sep 17 00:00:00 2001 From: Garrett D'Amore Date: Wed, 14 Aug 2024 00:16:44 -0700 Subject: fixes #1858 Warning on calloc() --- src/tools/perf/pubdrop.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'src') diff --git a/src/tools/perf/pubdrop.c b/src/tools/perf/pubdrop.c index bc067d76..0e493116 100644 --- a/src/tools/perf/pubdrop.c +++ b/src/tools/perf/pubdrop.c @@ -275,7 +275,7 @@ do_pubdrop(int argc, char **argv) die("Message size too small."); } - thrs = calloc(sizeof(nng_thread *), (size_t) pa.count + 1); + thrs = calloc((size_t) pa.count + 1, sizeof(nng_thread *)); if (((rv = nng_mtx_alloc(&pa.mtx)) != 0) || ((nng_cv_alloc(&pa.cv, pa.mtx)) != 0)) { die("Startup: %s\n", nng_strerror(rv)); -- cgit v1.2.3-70-g09d2