On Tue, Mar 28, 2023 at 06:25:13PM +0200, Laszlo Ersek wrote:
We usually zero-initialize vectors like
string_vector names = empty_vector;
Allocating and zeroing separately is frequently useful however. Document
the pattern
string_vector names;
names = (string_vector)empty_vector;
where "(string_vector)empty_vector" is a compound literal.
Link:
http://mid.mail-archive.com/20230221183810.vjilfbmj3woqivlj@redhat.com
Suggested-by: Eric Blake <eblake(a)redhat.com>
Signed-off-by: Laszlo Ersek <lersek(a)redhat.com>
---
Reviewed-by: Eric Blake <eblake(a)redhat.com>
--
Eric Blake, Principal Software Engineer
Red Hat, Inc. +1-919-301-3266
Virtualization:
qemu.org |
libvirt.org