]> git.ipfire.org Git - thirdparty/samba.git/commitdiff
smbd: Replace a ZERO_STRUCT with a direct struct initialization
authorVolker Lendecke <vl@samba.org>
Wed, 22 Oct 2025 09:13:18 +0000 (11:13 +0200)
committerVolker Lendecke <vl@samba.org>
Mon, 10 Nov 2025 13:29:30 +0000 (13:29 +0000)
Signed-off-by: Volker Lendecke <vl@samba.org>
Reviewed-by: Anoop C S <anoopcs@samba.org>
source3/smbd/vfs.c

index 328df11d6af5e1356e3d588673b5046dc4d5eea3..0faa3c87692e4d21f0163f047ae9cd90c1254b67 100644 (file)
@@ -1323,7 +1323,7 @@ uint32_t vfs_get_fs_capabilities(struct connection_struct *conn,
                loadparm_s3_global_substitution();
        uint32_t caps = FILE_CASE_SENSITIVE_SEARCH | FILE_CASE_PRESERVED_NAMES;
        struct smb_filename *smb_fname_cpath = NULL;
-       struct vfs_statvfs_struct statbuf;
+       struct vfs_statvfs_struct statbuf = {};
        int ret;
 
        smb_fname_cpath = synthetic_smb_fname(talloc_tos(),
@@ -1336,7 +1336,6 @@ uint32_t vfs_get_fs_capabilities(struct connection_struct *conn,
                return caps;
        }
 
-       ZERO_STRUCT(statbuf);
        ret = SMB_VFS_STATVFS(conn, smb_fname_cpath, &statbuf);
        if (ret == 0) {
                caps = statbuf.FsCapabilities;