mirror of
https://github.com/janet-lang/janet
synced 2025-11-14 06:17:15 +00:00
Fix -Werror=calloc-transposed-args
This commit is contained in:
@@ -934,7 +934,7 @@ JanetFuncDef *janetc_pop_funcdef(JanetCompiler *c) {
|
|||||||
int32_t slotchunks = (def->slotcount + 31) >> 5;
|
int32_t slotchunks = (def->slotcount + 31) >> 5;
|
||||||
/* numchunks is min of slotchunks and scope->ua.count */
|
/* numchunks is min of slotchunks and scope->ua.count */
|
||||||
int32_t numchunks = slotchunks > scope->ua.count ? scope->ua.count : slotchunks;
|
int32_t numchunks = slotchunks > scope->ua.count ? scope->ua.count : slotchunks;
|
||||||
uint32_t *chunks = janet_calloc(sizeof(uint32_t), slotchunks);
|
uint32_t *chunks = janet_calloc(slotchunks, sizeof(uint32_t));
|
||||||
if (NULL == chunks) {
|
if (NULL == chunks) {
|
||||||
JANET_OUT_OF_MEMORY;
|
JANET_OUT_OF_MEMORY;
|
||||||
}
|
}
|
||||||
|
|||||||
Reference in New Issue
Block a user