vfs: Convert xattr_tdb_unlink to cp_smb_filename
authorVolker Lendecke <vl@samba.org>
Thu, 11 Apr 2013 13:35:02 +0000 (15:35 +0200)
committerJeremy Allison <jra@samba.org>
Wed, 17 Apr 2013 21:49:55 +0000 (14:49 -0700)
Signed-off-by: Volker Lendecke <vl@samba.org>
Reviewed-by: Jeremy Allison <jra@samba.org>
source3/modules/vfs_xattr_tdb.c

index c0debed1f7e7220ff8ea4e04e4bafe4afe55b6eb..939be825c53eab38b5cbbc672843e5b748f8b0d8 100644 (file)
@@ -347,7 +347,6 @@ static int xattr_tdb_unlink(vfs_handle_struct *handle,
        struct smb_filename *smb_fname_tmp = NULL;
        struct file_id id;
        struct db_context *db;
-       NTSTATUS status;
        int ret = -1;
        bool remove_record = false;
        TALLOC_CTX *frame = talloc_stackframe();
@@ -358,10 +357,10 @@ static int xattr_tdb_unlink(vfs_handle_struct *handle,
                                        TALLOC_FREE(frame); return -1;
                                });
 
-       status = copy_smb_filename(frame, smb_fname, &smb_fname_tmp);
-       if (!NT_STATUS_IS_OK(status)) {
+       smb_fname_tmp = cp_smb_filename(frame, smb_fname);
+       if (smb_fname_tmp == NULL) {
                TALLOC_FREE(frame);
-               errno = map_errno_from_nt_status(status);
+               errno = ENOMEM;
                return -1;
        }