summary |
shortlog |
log |
commit | commitdiff |
tree
raw |
patch |
inline | side by side (from parent 1:
ccc95c1)
Signed-off-by: Felix Fietkau <nbd@openwrt.org>
h.answers = __cpu_to_be16(dns_answer_cnt);
h.flags = __cpu_to_be16(0x8400);
h.answers = __cpu_to_be16(dns_answer_cnt);
h.flags = __cpu_to_be16(0x8400);
- iov = malloc(sizeof(struct iovec) * ((dns_answer_cnt * 3) + 1));
- if (!iov)
- return;
-
+ iov = alloca(sizeof(struct iovec) * ((dns_answer_cnt * 3) + 1));
iov[0].iov_base = &h;
iov[0].iov_len = sizeof(struct dns_header);
iov[0].iov_base = &h;
iov[0].iov_len = sizeof(struct dns_header);