smbd: Convert set_create_timespec_ea to synthetic_smb_fname
authorVolker Lendecke <vl@samba.org>
Mon, 15 Apr 2013 09:36:30 +0000 (11:36 +0200)
committerJeremy Allison <jra@samba.org>
Wed, 17 Apr 2013 21:50:02 +0000 (14:50 -0700)
Signed-off-by: Volker Lendecke <vl@samba.org>
Reviewed-by: Jeremy Allison <jra@samba.org>
source3/smbd/dosmode.c

index 93eddbb865d14ded988711b90e29dce56a2b59cd..19b7675a542fc990e872ef64f56e35315c94e9d0 100644 (file)
@@ -1050,8 +1050,7 @@ NTSTATUS set_create_timespec_ea(connection_struct *conn,
                                const struct smb_filename *psmb_fname,
                                struct timespec create_time)
 {
-       NTSTATUS status;
-       struct smb_filename *smb_fname = NULL;
+       struct smb_filename *smb_fname;
        uint32_t dosmode;
        int ret;
 
@@ -1059,13 +1058,11 @@ NTSTATUS set_create_timespec_ea(connection_struct *conn,
                return NT_STATUS_OK;
        }
 
-       status = create_synthetic_smb_fname(talloc_tos(),
-                               psmb_fname->base_name,
-                               NULL, &psmb_fname->st,
-                               &smb_fname);
+       smb_fname = synthetic_smb_fname(talloc_tos(), psmb_fname->base_name,
+                                       NULL, &psmb_fname->st);
 
-       if (!NT_STATUS_IS_OK(status)) {
-               return status;
+       if (smb_fname == NULL) {
+               return NT_STATUS_NO_MEMORY;
        }
 
        dosmode = dos_mode(conn, smb_fname);