Skip to content

Commit fbd4faf

Browse files
gdamoreJaylinYu
authored andcommitted
fixes #1858 Warning on calloc()
1 parent 44a8623 commit fbd4faf

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

src/tools/perf/pubdrop.c

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -275,7 +275,7 @@ do_pubdrop(int argc, char **argv)
275275
die("Message size too small.");
276276
}
277277

278-
thrs = calloc(sizeof(nng_thread *), (size_t) pa.count + 1);
278+
thrs = calloc((size_t) pa.count + 1, sizeof(nng_thread *));
279279
if (((rv = nng_mtx_alloc(&pa.mtx)) != 0) ||
280280
((nng_cv_alloc(&pa.cv, pa.mtx)) != 0)) {
281281
die("Startup: %s\n", nng_strerror(rv));

0 commit comments

Comments
 (0)