s4-pvfs: another uninitialised variable
[ira/wip.git] / source4 / ntvfs / posix / pvfs_unlink.c
index 6a5704177041ea9b1b808fa7bda36d9f3bd29ef6..67e7d76b47f6fbd116dccd84f6523b4fdce68c87 100644 (file)
@@ -84,7 +84,8 @@ static NTSTATUS pvfs_unlink_setup_retry(struct ntvfs_module_context *ntvfs,
                                        struct odb_lock *lck,
                                        NTSTATUS status)
 {
-       struct pvfs_state *pvfs = ntvfs->private_data;
+       struct pvfs_state *pvfs = talloc_get_type(ntvfs->private_data,
+                                 struct pvfs_state);
        struct timeval end_time;
 
        if (NT_STATUS_EQUAL(status, NT_STATUS_SHARING_VIOLATION)) {
@@ -108,7 +109,7 @@ static NTSTATUS pvfs_unlink_setup_retry(struct ntvfs_module_context *ntvfs,
 static NTSTATUS pvfs_unlink_file(struct pvfs_state *pvfs,
                                 struct pvfs_filename *name)
 {
-       NTSTATUS status;
+       NTSTATUS status = NT_STATUS_OK;
 
        if (name->dos.attrib & FILE_ATTRIBUTE_DIRECTORY) {
                return NT_STATUS_FILE_IS_A_DIRECTORY;
@@ -191,7 +192,8 @@ NTSTATUS pvfs_unlink(struct ntvfs_module_context *ntvfs,
                     struct ntvfs_request *req,
                     union smb_unlink *unl)
 {
-       struct pvfs_state *pvfs = ntvfs->private_data;
+       struct pvfs_state *pvfs = talloc_get_type(ntvfs->private_data,
+                                 struct pvfs_state);
        struct pvfs_dir *dir;
        NTSTATUS status;
        uint32_t total_deleted=0;