gc.c: combine variable declaration with initialization

Co-authored-by: Claude <noreply@anthropic.com>
This commit is contained in:
Yukihiro "Matz" Matsumoto
2025-10-23 11:34:21 +09:00
parent 93619f06dd
commit 036b40e265
+1 -2
View File
@@ -245,8 +245,7 @@ mrb_calloc(mrb_state *mrb, size_t nelem, size_t len)
if (nelem > 0 && len > 0 &&
nelem <= SIZE_MAX / len) {
size_t size;
size = nelem * len;
size_t size = nelem * len;
p = mrb_malloc(mrb, size);
memset(p, 0, size);