Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
sd-resolve: workaround for structured initialization to nested structs
When a nested struct is initialized by structured initializer, then padding space is not cleared by zero. So, before setting values, this makes explicitly set zero including padding. This fixes the following false positive warning by valgrind: ``` ==492== Syscall param sendmsg(msg.msg_iov[0]) points to uninitialised byte(s) ==492== at 0x56D0CF7: sendmsg (in /usr/lib64/libpthread-2.27.so) ==492== by 0x4FDD3C5: sd_resolve_getaddrinfo (sd-resolve.c:975) ==492== by 0x110B9E: manager_connect (timesyncd-manager.c:879) ==492== by 0x10B729: main (timesyncd.c:165) ==492== Address 0x1fff0008f1 is on thread 1's stack ==492== in frame #1, created by sd_resolve_getaddrinfo (sd-resolve.c:928) ==492== ```
- Loading branch information