]> git.ipfire.org Git - thirdparty/samba.git/commitdiff
smbd: Simplify init_smb_file_time
authorVolker Lendecke <vl@samba.org>
Tue, 25 Jun 2024 11:06:35 +0000 (13:06 +0200)
committerRalph Boehme <slow@samba.org>
Fri, 28 Jun 2024 13:26:24 +0000 (13:26 +0000)
Call make_omit_timespec just once, saves a few .text bytes

Signed-off-by: Volker Lendecke <vl@samba.org>
Reviewed-by: Ralph Boehme <slow@samba.org>
source3/smbd/vfs.c

index 0b061f1cc31cc8c1397044ce06d20d7448faf691..13b3ba61ceac49223f0694fee26f3c5d92b612c1 100644 (file)
@@ -1190,11 +1190,13 @@ NTSTATUS vfs_stat_fsp(files_struct *fsp)
 
 void init_smb_file_time(struct smb_file_time *ft)
 {
+       struct timespec omit = make_omit_timespec();
+
        *ft = (struct smb_file_time) {
-               .atime = make_omit_timespec(),
-               .ctime = make_omit_timespec(),
-               .mtime = make_omit_timespec(),
-               .create_time = make_omit_timespec()
+               .atime = omit,
+               .ctime = omit,
+               .mtime = omit,
+               .create_time = omit,
        };
 }