summaryrefslogtreecommitdiffstats
path: root/source/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
commit7b154dc4313324dfad6cf0117b8ce246bf12bf16 (patch)
tree16189315a5407b7be2c7cbc7e5c282aa89d8ce83 /source/smbd/files.c
parentead0338ad27f29f1abbbe9f6302d6bf633bf98b2 (diff)
downloadsamba-7b154dc4313324dfad6cf0117b8ce246bf12bf16.tar.gz
samba-7b154dc4313324dfad6cf0117b8ce246bf12bf16.tar.xz
samba-7b154dc4313324dfad6cf0117b8ce246bf12bf16.zip
some cleanups to use ZERO_STRUCT() and friends
Diffstat (limited to 'source/smbd/files.c')
-rw-r--r--source/smbd/files.c8
1 files changed, 4 insertions, 4 deletions
diff --git a/source/smbd/files.c b/source/smbd/files.c
index 0fe6a4ebd1b..ed14b86e5fe 100644
--- a/source/smbd/files.c
+++ b/source/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;