summaryrefslogtreecommitdiff
path: root/source3/torture
diff options
context:
space:
mode:
authorVolker Lendecke <vl@samba.org>2013-04-15 11:46:24 +0200
committerJeremy Allison <jra@samba.org>2013-04-17 14:50:03 -0700
commita6985e6e678e2ca8867097671192cf3a94e772e1 (patch)
treede09eeac3fbd1522c924540be51e230816856c73 /source3/torture
parent434885a4ac4ba1c75326c847a484e65f7dd16153 (diff)
downloadsamba-a6985e6e678e2ca8867097671192cf3a94e772e1.tar.gz
samba-a6985e6e678e2ca8867097671192cf3a94e772e1.tar.bz2
samba-a6985e6e678e2ca8867097671192cf3a94e772e1.zip
vfstest: Convert cmd_rename to synthetic_smb_fname
Signed-off-by: Volker Lendecke <vl@samba.org> Reviewed-by: Jeremy Allison <jra@samba.org>
Diffstat (limited to 'source3/torture')
-rw-r--r--source3/torture/cmd_vfs.c15
1 files changed, 6 insertions, 9 deletions
diff --git a/source3/torture/cmd_vfs.c b/source3/torture/cmd_vfs.c
index f9c350a919..868220af18 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 <old> <new>\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);