]> git.ipfire.org Git - thirdparty/samba.git/commitdiff
smbd: Simplify smbd_do_qfsinfo with direct struct initialization
authorVolker Lendecke <vl@samba.org>
Thu, 27 Jun 2024 10:50:50 +0000 (12:50 +0200)
committerRalph Boehme <slow@samba.org>
Fri, 28 Jun 2024 13:26:24 +0000 (13:26 +0000)
Signed-off-by: Volker Lendecke <vl@samba.org>
Reviewed-by: Ralph Boehme <slow@samba.org>
source3/smbd/smb2_trans2.c

index 0e1abd095b56d15c2779645a1f717d3674e009ec..cb7390133fed092cd7dd034be6d5c318d3c5d163 100644 (file)
@@ -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) {