]> git.ipfire.org Git - thirdparty/samba.git/commitdiff
Remove a pointless level of indirection
authorVolker Lendecke <vl@samba.org>
Wed, 8 Oct 2008 15:42:22 +0000 (17:42 +0200)
committerVolker Lendecke <vl@samba.org>
Thu, 9 Oct 2008 10:06:39 +0000 (12:06 +0200)
source3/include/proto.h
source3/smbd/fake_file.c
source3/smbd/files.c

index b7e363253f631f8845eb681f2f4d303aa25917c8..99557a25a15fada59e14cce5e83aacb4627c935f 100644 (file)
@@ -9558,7 +9558,6 @@ NTSTATUS open_fake_file(connection_struct *conn,
                                const char *fname,
                                uint32 access_mask,
                                files_struct **result);
-void destroy_fake_file_handle(struct fake_file_handle **fh);
 NTSTATUS close_fake_file(files_struct *fsp);
 
 /* The following definitions come from smbd/file_access.c  */
index 8dd9abee1ad4697ab3bba1198ba4265d3a5595e9..1761cb66a85c17b3a1b32e6a6dbd490d98150cb9 100644 (file)
@@ -146,14 +146,6 @@ NTSTATUS open_fake_file(connection_struct *conn,
        return NT_STATUS_OK;
 }
 
-void destroy_fake_file_handle(struct fake_file_handle **fh)
-{
-       if (!fh) {
-               return;
-       }
-       TALLOC_FREE(*fh);
-}
-
 NTSTATUS close_fake_file(files_struct *fsp)
 {
        file_free(fsp);
index 8d06e20f810f541c5f63ec858c3baf3d7f186ecf..519f4945f2268bc4c1d4c91b4fe0005d687c7eea 100644 (file)
@@ -400,9 +400,7 @@ void file_free(files_struct *fsp)
 
        string_free(&fsp->fsp_name);
 
-       if (fsp->fake_file_handle) {
-               destroy_fake_file_handle(&fsp->fake_file_handle);
-       }
+       TALLOC_FREE(fsp->fake_file_handle);
 
        if (fsp->fh->ref_count == 1) {
                SAFE_FREE(fsp->fh);