diff options
| author | Garrett D'Amore <garrett@damore.org> | 2024-08-14 00:16:44 -0700 |
|---|---|---|
| committer | Garrett D'Amore <garrett@damore.org> | 2024-08-14 00:16:44 -0700 |
| commit | 88c010725329a32ade46e9f9e4245f0b79e161ed (patch) | |
| tree | 6d549793f26e4d7be0cb1c9bba8ae0440cc3d4f2 | |
| parent | 7da7c10bbccb30bc2ff0a80d7e5a159f3c86e36a (diff) | |
| download | nng-88c010725329a32ade46e9f9e4245f0b79e161ed.tar.gz nng-88c010725329a32ade46e9f9e4245f0b79e161ed.tar.bz2 nng-88c010725329a32ade46e9f9e4245f0b79e161ed.zip | |
fixes #1858 Warning on calloc()
| -rw-r--r-- | src/tools/perf/pubdrop.c | 2 |
1 files changed, 1 insertions, 1 deletions
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)); |
