From bad58301fbb2e8f273b2c88531d388b38e5ec18a Mon Sep 17 00:00:00 2001 From: Susant Sahani Date: Thu, 20 Nov 2025 15:02:27 +0530 Subject: [PATCH] daemon: use compound literal for zero timeval in check_for_library_cancellation Signed-off-by: Susant Sahani --- daemon/proto.c | 6 ++---- 1 file changed, 2 insertions(+), 4 deletions(-) diff --git a/daemon/proto.c b/daemon/proto.c index 5e5923700..806664b18 100644 --- a/daemon/proto.c +++ b/daemon/proto.c @@ -501,7 +501,6 @@ static int check_for_library_cancellation (void) { fd_set rset; - struct timeval tv; int r; char buf[4]; uint32_t flag; @@ -509,9 +508,8 @@ check_for_library_cancellation (void) FD_ZERO (&rset); FD_SET (sock, &rset); - tv.tv_sec = 0; - tv.tv_usec = 0; - r = select (sock+1, &rset, NULL, NULL, &tv); + + r = select (sock+1, &rset, NULL, NULL, &(struct timeval){ 0 }); if (r == -1) { perror ("select"); return 0;