From a6985e6e678e2ca8867097671192cf3a94e772e1 Mon Sep 17 00:00:00 2001 From: Volker Lendecke Date: Mon, 15 Apr 2013 11:46:24 +0200 Subject: [PATCH] vfstest: Convert cmd_rename to synthetic_smb_fname Signed-off-by: Volker Lendecke Reviewed-by: Jeremy Allison --- source3/torture/cmd_vfs.c | 15 ++++++--------- 1 file changed, 6 insertions(+), 9 deletions(-) diff --git a/source3/torture/cmd_vfs.c b/source3/torture/cmd_vfs.c index f9c350a9191..868220af182 100644 --- a/source3/torture/cmd_vfs.c +++ b/source3/torture/cmd_vfs.c @@ -550,24 +550,21 @@ static NTSTATUS cmd_rename(struct vfs_state *vfs, TALLOC_CTX *mem_ctx, int argc, int ret; struct smb_filename *smb_fname_src = NULL; struct smb_filename *smb_fname_dst = NULL; - NTSTATUS status; if (argc != 3) { printf("Usage: rename \n"); return NT_STATUS_OK; } - status = create_synthetic_smb_fname_split(mem_ctx, argv[1], NULL, - &smb_fname_src); - if (!NT_STATUS_IS_OK(status)) { - return status; + smb_fname_src = synthetic_smb_fname_split(mem_ctx, argv[1], NULL); + if (smb_fname_src == NULL) { + return NT_STATUS_NO_MEMORY; } - status = create_synthetic_smb_fname_split(mem_ctx, argv[2], NULL, - &smb_fname_dst); - if (!NT_STATUS_IS_OK(status)) { + smb_fname_dst = synthetic_smb_fname_split(mem_ctx, argv[2], NULL); + if (smb_fname_dst == NULL) { TALLOC_FREE(smb_fname_src); - return status; + return NT_STATUS_NO_MEMORY; } ret = SMB_VFS_RENAME(vfs->conn, smb_fname_src, smb_fname_dst);