]> git.ipfire.org Git - thirdparty/samba.git/commitdiff
smbd: Use a struct initializer
authorVolker Lendecke <vl@samba.org>
Thu, 25 Apr 2019 19:03:35 +0000 (21:03 +0200)
committerJeremy Allison <jra@samba.org>
Fri, 3 May 2019 22:34:16 +0000 (22:34 +0000)
With -O3 this saves 32 bytes of .text

Signed-off-by: Volker Lendecke <vl@samba.org>
Reviewed-by: Jeremy Allison <jra@samba.org>
source3/smbd/fileio.c

index cde6a057ccdafc65f1148a4a43976330421c6a64..a00b368f92bc7d0f31299968c7cebfd6f4f12264 100644 (file)
@@ -264,8 +264,7 @@ void trigger_write_time_update_immediate(struct files_struct *fsp)
        fsp->update_write_time_triggered = true;
         fsp->update_write_time_on_close = false;
 
-       ZERO_STRUCT(ft);
-       ft.mtime = timespec_current();
+       ft = (struct smb_file_time) { .mtime = timespec_current() };
 
        /* Update the time in the open file db. */
        (void)set_write_time(fsp->file_id, ft.mtime);