From 60c06f328726b28df8d72503e1bc287a5ab3f36c Mon Sep 17 00:00:00 2001 From: Susant Sahani Date: Thu, 20 Nov 2025 14:54:12 +0530 Subject: [PATCH] daemon: modernize send_file_end() with compound literal Signed-off-by: Susant Sahani --- daemon/proto.c | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/daemon/proto.c b/daemon/proto.c index 9f14e3361..5e5923700 100644 --- a/daemon/proto.c +++ b/daemon/proto.c @@ -540,11 +540,11 @@ check_for_library_cancellation (void) int send_file_end (int cancel) { - guestfs_chunk chunk; + const guestfs_chunk chunk = { + .cancel = cancel, + .data = { .data_len = 0, .data_val = NULL } + }; - chunk.cancel = cancel; - chunk.data.data_len = 0; - chunk.data.data_val = NULL; return send_chunk (&chunk); }