From 9b1f95efe3900ce399300c2e6db401cc340a9d9f Mon Sep 17 00:00:00 2001 From: Jeremy Allison Date: Mon, 15 Apr 2013 16:54:20 -0700 Subject: [PATCH] Cleanup. Remove unused function dptr_DirCacheAdd(). Make DirCacheAdd() static. Signed-off-by: Jeremy Allison --- source3/smbd/dir.c | 13 +++---------- source3/smbd/proto.h | 2 -- 2 files changed, 3 insertions(+), 12 deletions(-) diff --git a/source3/smbd/dir.c b/source3/smbd/dir.c index 00c33d6..a21a33e 100644 --- a/source3/smbd/dir.c +++ b/source3/smbd/dir.c @@ -74,6 +74,8 @@ static struct smb_Dir *OpenDir_fsp(TALLOC_CTX *mem_ctx, connection_struct *conn, const char *mask, uint32 attr); +static void DirCacheAdd(struct smb_Dir *dirp, const char *name, long offset); + #define INVALID_DPTR_KEY (-3) /**************************************************************************** @@ -888,15 +890,6 @@ bool dptr_SearchDir(struct dptr_struct *dptr, const char *name, long *poffset, S } /**************************************************************************** - Add the name we're returning into the underlying cache. -****************************************************************************/ - -void dptr_DirCacheAdd(struct dptr_struct *dptr, const char *name, long offset) -{ - DirCacheAdd(dptr->dir_hnd, name, offset); -} - -/**************************************************************************** Initialize variables & state data at the beginning of all search SMB requests. ****************************************************************************/ void dptr_init_search_op(struct dptr_struct *dptr) @@ -1680,7 +1673,7 @@ long TellDir(struct smb_Dir *dirp) Add an entry into the dcache. ********************************************************************/ -void DirCacheAdd(struct smb_Dir *dirp, const char *name, long offset) +static void DirCacheAdd(struct smb_Dir *dirp, const char *name, long offset) { struct name_cache_entry *e; diff --git a/source3/smbd/proto.h b/source3/smbd/proto.h index 2be73a2..6d5bdba 100644 --- a/source3/smbd/proto.h +++ b/source3/smbd/proto.h @@ -211,7 +211,6 @@ char *dptr_ReadDirName(TALLOC_CTX *ctx, long *poffset, SMB_STRUCT_STAT *pst); bool dptr_SearchDir(struct dptr_struct *dptr, const char *name, long *poffset, SMB_STRUCT_STAT *pst); -void dptr_DirCacheAdd(struct dptr_struct *dptr, const char *name, long offset); void dptr_init_search_op(struct dptr_struct *dptr); bool dptr_fill(struct smbd_server_connection *sconn, char *buf1,unsigned int key); @@ -238,7 +237,6 @@ const char *ReadDirName(struct smb_Dir *dirp, long *poffset, void RewindDir(struct smb_Dir *dirp, long *poffset); void SeekDir(struct smb_Dir *dirp, long offset); long TellDir(struct smb_Dir *dirp); -void DirCacheAdd(struct smb_Dir *dirp, const char *name, long offset); bool SearchDir(struct smb_Dir *dirp, const char *name, long *poffset); NTSTATUS can_delete_directory(struct connection_struct *conn, const char *dirname); -- 1.7.10.4