From: Volker Lendecke Date: Mon, 1 Dec 2025 18:28:27 +0000 (+0100) Subject: lib: Save lines with direct initialization X-Git-Tag: tdb-1.4.15~171 X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=7f670a3994cff9d6eb83bfede880c23f709a44b8;p=thirdparty%2Fsamba.git lib: Save lines with direct initialization Signed-off-by: Volker Lendecke Reviewed-by: Anoop C S --- diff --git a/source3/lib/util_sock.c b/source3/lib/util_sock.c index 3b543ebba15..44c38de5ccf 100644 --- a/source3/lib/util_sock.c +++ b/source3/lib/util_sock.c @@ -1113,12 +1113,9 @@ bool is_myname_or_ipaddr(const char *s) int poll_one_fd(int fd, int events, int timeout, int *revents) { - struct pollfd pfd; + struct pollfd pfd = {.fd = fd, .events = events}; int ret; - pfd.fd = fd; - pfd.events = events; - ret = poll(&pfd, 1, timeout); /* @@ -1131,12 +1128,9 @@ int poll_one_fd(int fd, int events, int timeout, int *revents) int poll_intr_one_fd(int fd, int events, int timeout, int *revents) { - struct pollfd pfd; + struct pollfd pfd = {.fd = fd, .events = events}; int ret; - pfd.fd = fd; - pfd.events = events; - ret = sys_poll_intr(&pfd, 1, timeout); if (ret <= 0) { *revents = 0;