vfstest: Convert cmd_pathfunc to synthetic_smb_fname
authorVolker Lendecke <vl@samba.org>
Mon, 15 Apr 2013 09:44:35 +0000 (11:44 +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/torture/cmd_vfs.c

index 0b3d0d0424fd9cf1121284f11c192457e570ac40..f9c350a9191e2d888b8fd1d3be7b9a325e749a64 100644 (file)
@@ -397,13 +397,11 @@ static NTSTATUS cmd_pathfunc(struct vfs_state *vfs, TALLOC_CTX *mem_ctx, int arg
        if (strcmp("rmdir", argv[0]) == 0 ) {
                ret = SMB_VFS_RMDIR(vfs->conn, argv[1]);
        } else if (strcmp("unlink", argv[0]) == 0 ) {
-               struct smb_filename *smb_fname = NULL;
-               NTSTATUS status;
+               struct smb_filename *smb_fname;
 
-               status = create_synthetic_smb_fname_split(mem_ctx, argv[1],
-                                                         NULL, &smb_fname);
-               if (!NT_STATUS_IS_OK(status)) {
-                       return status;
+               smb_fname = synthetic_smb_fname_split(mem_ctx, argv[1], NULL);
+               if (smb_fname == NULL) {
+                       return NT_STATUS_NO_MEMORY;
                }
 
                ret = SMB_VFS_UNLINK(vfs->conn, smb_fname);