From: Volker Lendecke Date: Thu, 27 Jun 2024 10:50:50 +0000 (+0200) Subject: smbd: Simplify smbd_do_qfsinfo with direct struct initialization X-Git-Tag: tdb-1.4.11~252 X-Git-Url: http://git.ipfire.org/gitweb.cgi?a=commitdiff_plain;h=b565901a47483ec3782c532a1e87dcf213e30fbe;p=thirdparty%2Fsamba.git smbd: Simplify smbd_do_qfsinfo with direct struct initialization Signed-off-by: Volker Lendecke Reviewed-by: Ralph Boehme --- diff --git a/source3/smbd/smb2_trans2.c b/source3/smbd/smb2_trans2.c index 0e1abd095b5..cb7390133fe 100644 --- a/source3/smbd/smb2_trans2.c +++ b/source3/smbd/smb2_trans2.c @@ -2368,14 +2368,11 @@ cBytesSector=%u, cUnitTotal=%u, cUnitAvail=%d\n", (unsigned int)bsize, (unsigned /* we need to fake up a fsp here, * because its not send in this call */ - files_struct tmpfsp; - SMB_NTQUOTA_STRUCT quotas; - - ZERO_STRUCT(tmpfsp); - ZERO_STRUCT(quotas); - - tmpfsp.conn = conn; - tmpfsp.fnum = FNUM_FIELD_INVALID; + files_struct tmpfsp = { + .conn = conn, + .fnum = FNUM_FIELD_INVALID, + }; + SMB_NTQUOTA_STRUCT quotas = {}; /* access check */ if (get_current_uid(conn) != 0) {