summaryrefslogtreecommitdiff
path: root/source3/smbd/files.c
diff options
context:
space:
mode:
authorAndrew Tridgell <tridge@samba.org>1998-09-05 13:24:20 +0000
committerAndrew Tridgell <tridge@samba.org>1998-09-05 13:24:20 +0000
commitf6044c87c021342d68d614d59bc8dacd32d223b9 (patch)
tree1e59411c92f35d49856438bf9f42092100a12064 /source3/smbd/files.c
parent0cb85e04a974daf4442a7561931ff1be566a8410 (diff)
downloadsamba-f6044c87c021342d68d614d59bc8dacd32d223b9.tar.gz
samba-f6044c87c021342d68d614d59bc8dacd32d223b9.tar.bz2
samba-f6044c87c021342d68d614d59bc8dacd32d223b9.zip
some cleanups to use ZERO_STRUCT() and friends
(This used to be commit 7b154dc4313324dfad6cf0117b8ce246bf12bf16)
Diffstat (limited to 'source3/smbd/files.c')
-rw-r--r--source3/smbd/files.c8
1 files changed, 4 insertions, 4 deletions
diff --git a/source3/smbd/files.c b/source3/smbd/files.c
index 0fe6a4ebd1..ed14b86e5f 100644
--- a/source3/smbd/files.c
+++ b/source3/smbd/files.c
@@ -91,7 +91,7 @@ files_struct *file_new(void )
fsp = (files_struct *)malloc(sizeof(*fsp));
if (!fsp) return NULL;
- memset(fsp, 0, sizeof(*fsp));
+ ZERO_STRUCTP(fsp);
first_file = (i+1) % MAX_FNUMS;
@@ -166,7 +166,7 @@ file_fd_struct *fd_get_new(void)
fd_ptr = (file_fd_struct *)malloc(sizeof(*fd_ptr));
if (!fd_ptr) return NULL;
- memset(fd_ptr, 0, sizeof(*fd_ptr));
+ ZERO_STRUCTP(fd_ptr);
fd_ptr->fdnum = i;
fd_ptr->dev = (SMB_DEV_T)-1;
@@ -327,7 +327,7 @@ void fd_ptr_free(file_fd_struct *fd_ptr)
fd_ptr->fdnum, fd_ptr_used));
/* paranoia */
- memset(fd_ptr, 0, sizeof(*fd_ptr));
+ ZERO_STRUCTP(fd_ptr);
free(fd_ptr);
}
@@ -354,7 +354,7 @@ void file_free(files_struct *fsp)
/* this is paranoia, just in case someone tries to reuse the
information */
- memset(fsp, 0, sizeof(*fsp));
+ ZERO_STRUCTP(fsp);
if (fsp == chain_fsp) chain_fsp = NULL;