From 79eae9e38ac2ef967671b43fc2eb76d8b195eee8 Mon Sep 17 00:00:00 2001 From: Jeremy Allison Date: Wed, 17 Jul 2019 09:40:04 -0700 Subject: [PATCH] s3: smbd: Naming consistency. Change all uses of struct smb_Dir * variables to be dir_hnd. Fixes smb_Dir_destructor(). No logic changes. Signed-off-by: Jeremy Allison Reviewed-by: Andreas Schneider --- source3/smbd/dir.c | 21 +++++++++++---------- 1 file changed, 11 insertions(+), 10 deletions(-) diff --git a/source3/smbd/dir.c b/source3/smbd/dir.c index 71cbfc6d10b..73b3d2483aa 100644 --- a/source3/smbd/dir.c +++ b/source3/smbd/dir.c @@ -90,7 +90,7 @@ static struct smb_Dir *open_dir_safely(TALLOC_CTX *ctx, const struct smb_filename *smb_dname, const char *wcard, uint32_t attr); -static int smb_Dir_destructor(struct smb_Dir *dirp); +static int smb_Dir_destructor(struct smb_Dir *dir_hnd); #define INVALID_DPTR_KEY (-3) @@ -1512,22 +1512,23 @@ bool is_visible_file(connection_struct *conn, const char *dir_path, return ret; } -static int smb_Dir_destructor(struct smb_Dir *dirp) +static int smb_Dir_destructor(struct smb_Dir *dir_hnd) { - if (dirp->dir != NULL) { - SMB_VFS_CLOSEDIR(dirp->conn,dirp->dir); - if (dirp->fsp != NULL) { + if (dir_hnd->dir != NULL) { + SMB_VFS_CLOSEDIR(dir_hnd->conn, dir_hnd->dir); + if (dir_hnd->fsp != NULL) { /* * The SMB_VFS_CLOSEDIR above * closes the underlying fd inside * dirp->fsp. */ - dirp->fsp->fh->fd = -1; - if (dirp->fsp->dptr != NULL) { - SMB_ASSERT(dirp->fsp->dptr->dir_hnd == dirp); - dirp->fsp->dptr->dir_hnd = NULL; + dir_hnd->fsp->fh->fd = -1; + if (dir_hnd->fsp->dptr != NULL) { + SMB_ASSERT(dir_hnd->fsp->dptr->dir_hnd == + dir_hnd); + dir_hnd->fsp->dptr->dir_hnd = NULL; } - dirp->fsp = NULL; + dir_hnd->fsp = NULL; } } return 0;