summaryrefslogtreecommitdiff
path: root/testcode/perf.c
diff options
context:
space:
mode:
authorCy Schubert <cy@FreeBSD.org>2024-10-18 13:52:55 +0000
committerCy Schubert <cy@FreeBSD.org>2024-10-18 13:52:55 +0000
commit0a6d797cf6eb751d7eb613900cd19803e05d905f (patch)
treec52b0ffbf8879fbe81816528e0fc7c3dd0f64e1f /testcode/perf.c
parent9b8db746ac608ff7cdad3c9ac7ac395319e4ea0f (diff)
Diffstat (limited to 'testcode/perf.c')
-rw-r--r--testcode/perf.c6
1 files changed, 3 insertions, 3 deletions
diff --git a/testcode/perf.c b/testcode/perf.c
index 2be86c4bf597..0a4ff1726f6b 100644
--- a/testcode/perf.c
+++ b/testcode/perf.c
@@ -220,7 +220,7 @@ perfsetup(struct perfinfo* info)
#endif
signal(SIGTERM, perf_sigh) == SIG_ERR)
fatal_exit("could not bind to signal");
- info->io = (struct perfio*)calloc(sizeof(struct perfio), info->io_num);
+ info->io = (struct perfio*)calloc(info->io_num, sizeof(struct perfio));
if(!info->io) fatal_exit("out of memory");
#ifndef S_SPLINT_S
FD_ZERO(&info->rset);
@@ -501,8 +501,8 @@ qlist_grow_capacity(struct perfinfo* info)
{
size_t newcap = (size_t)((info->qlist_capacity==0)?16:
info->qlist_capacity*2);
- uint8_t** d = (uint8_t**)calloc(sizeof(uint8_t*), newcap);
- size_t* l = (size_t*)calloc(sizeof(size_t), newcap);
+ uint8_t** d = (uint8_t**)calloc(newcap, sizeof(uint8_t*));
+ size_t* l = (size_t*)calloc(newcap, sizeof(size_t));
if(!d || !l) fatal_exit("out of memory");
if(info->qlist_data && info->qlist_capacity)
memcpy(d, info->qlist_data, sizeof(uint8_t*)*