mirror of
https://gitlab.nic.cz/labs/bird.git
synced 2024-11-08 20:28:43 +00:00
Filter: Don't alloc varargs array if its length would be zero
This commit is contained in:
parent
e4d74d8748
commit
f31be45de1
@ -143,7 +143,7 @@ FID_IFCONST([[
|
|||||||
}
|
}
|
||||||
FID_IFCONST([[
|
FID_IFCONST([[
|
||||||
const struct f_inst **items = NULL;
|
const struct f_inst **items = NULL;
|
||||||
if (constargs) {
|
if (constargs && whati->varcount) {
|
||||||
items = alloca(whati->varcount * sizeof(struct f_inst *));
|
items = alloca(whati->varcount * sizeof(struct f_inst *));
|
||||||
const struct f_inst *child = fvar;
|
const struct f_inst *child = fvar;
|
||||||
for (uint i=0; child; i++)
|
for (uint i=0; child; i++)
|
||||||
|
Loading…
Reference in New Issue
Block a user