summaryrefslogtreecommitdiff
path: root/source3/smbd
diff options
context:
space:
mode:
authorJeremy Allison <jra@samba.org>2005-06-02 23:18:52 +0000
committerGerald (Jerry) Carter <jerry@samba.org>2007-10-10 10:57:05 -0500
commited5e7ff9f184fd36b4344c958f145cc4a4987c71 (patch)
treeac38252c75d1658b45ee7c733a0cdb012b624877 /source3/smbd
parent503914b2c506dbe7cfd1fa56f93b44860f48e6a3 (diff)
downloadsamba-ed5e7ff9f184fd36b4344c958f145cc4a4987c71.tar.gz
samba-ed5e7ff9f184fd36b4344c958f145cc4a4987c71.tar.bz2
samba-ed5e7ff9f184fd36b4344c958f145cc4a4987c71.zip
r7200: Don't use memset, use SET_STAT_INVALID (has the same effect).
Jeremy. (This used to be commit 0b6f87d5e14da461bd2b1c3a4e6f47a69d2cd1c4)
Diffstat (limited to 'source3/smbd')
-rw-r--r--source3/smbd/dir.c6
-rw-r--r--source3/smbd/filename.c6
-rw-r--r--source3/smbd/notify_hash.c2
-rw-r--r--source3/smbd/service.c2
4 files changed, 8 insertions, 8 deletions
diff --git a/source3/smbd/dir.c b/source3/smbd/dir.c
index d66d1601fb..935ca20195 100644
--- a/source3/smbd/dir.c
+++ b/source3/smbd/dir.c
@@ -560,7 +560,7 @@ const char *dptr_ReadDirName(struct dptr_struct *dptr, long *poffset, SMB_STRUCT
{
pstring pathreal;
- ZERO_STRUCTP(pst);
+ SET_STAT_INVALID(pst);
if (dptr->has_wild) {
return dptr_normal_ReadDirName(dptr, poffset, pst);
@@ -629,7 +629,7 @@ const char *dptr_ReadDirName(struct dptr_struct *dptr, long *poffset, SMB_STRUCT
BOOL dptr_SearchDir(struct dptr_struct *dptr, const char *name, long *poffset, SMB_STRUCT_STAT *pst)
{
- ZERO_STRUCTP(pst);
+ SET_STAT_INVALID(pst);
if (!dptr->has_wild && (dptr->dir_hnd->offset == -1)) {
/* This is a singleton directory and we're already at the end. */
@@ -958,7 +958,7 @@ BOOL is_visible_file(connection_struct *conn, const char *dir_path, const char *
BOOL hide_unwriteable = lp_hideunwriteable_files(SNUM(conn));
BOOL hide_special = lp_hide_special_files(SNUM(conn));
- ZERO_STRUCTP(pst);
+ SET_STAT_INVALID(pst);
if ((strcmp(".",name) == 0) || (strcmp("..",name) == 0)) {
return True; /* . and .. are always visible. */
diff --git a/source3/smbd/filename.c b/source3/smbd/filename.c
index 7191e75715..733001bc91 100644
--- a/source3/smbd/filename.c
+++ b/source3/smbd/filename.c
@@ -92,7 +92,7 @@ BOOL unix_convert(pstring name,connection_struct *conn,char *saved_last_componen
BOOL component_was_mangled = False;
BOOL name_has_wildcard = False;
- ZERO_STRUCTP(pst);
+ SET_STAT_INVALID(pst);
*dirpath = 0;
*bad_path = False;
@@ -258,7 +258,7 @@ BOOL unix_convert(pstring name,connection_struct *conn,char *saved_last_componen
pstring rest;
/* Stat failed - ensure we don't use it. */
- ZERO_STRUCT(st);
+ SET_STAT_INVALID(st);
*rest = 0;
/*
@@ -346,7 +346,7 @@ BOOL unix_convert(pstring name,connection_struct *conn,char *saved_last_componen
if (SMB_VFS_STAT(conn,name, &st) == 0) {
*pst = st;
} else {
- ZERO_STRUCT(st);
+ SET_STAT_INVALID(st);
}
}
} /* end else */
diff --git a/source3/smbd/notify_hash.c b/source3/smbd/notify_hash.c
index b16b767783..0464eaa2eb 100644
--- a/source3/smbd/notify_hash.c
+++ b/source3/smbd/notify_hash.c
@@ -91,7 +91,7 @@ static BOOL notify_hash(connection_struct *conn, char *path, uint32 flags,
offset = 0;
while ((fname = ReadDirName(dp, &offset))) {
- ZERO_STRUCT(st);
+ SET_STAT_INVALID(st);
if(strequal(fname, ".") || strequal(fname, ".."))
continue;
diff --git a/source3/smbd/service.c b/source3/smbd/service.c
index c63a43bac0..0566dd8102 100644
--- a/source3/smbd/service.c
+++ b/source3/smbd/service.c
@@ -275,7 +275,7 @@ static connection_struct *make_connection_snum(int snum, user_struct *vuser,
*user = 0;
fstrcpy(dev, pdev);
- ZERO_STRUCT(st);
+ SET_STAT_INVALD(st);
if (NT_STATUS_IS_ERR(*status = share_sanity_checks(snum, dev))) {
return NULL;