diff options
author | Volker Lendecke <vl@samba.org> | 2011-12-15 16:30:08 +0100 |
---|---|---|
committer | Volker Lendecke <vl@samba.org> | 2011-12-16 07:34:48 +0100 |
commit | 2349c027c1125114363343b71624bf8aa96711b8 (patch) | |
tree | 958f92fb78d374526be58f37b33e99d0ae28deb8 | |
parent | ce30a7ae7be70eb4cfac5454d453c32c71e4a5ed (diff) | |
download | samba-2349c027c1125114363343b71624bf8aa96711b8.tar.gz samba-2349c027c1125114363343b71624bf8aa96711b8.tar.bz2 samba-2349c027c1125114363343b71624bf8aa96711b8.zip |
s3: Make open_file_ntcreate a bit easier to read
Move the declaration of "id" closer to its use
-rw-r--r-- | source3/smbd/open.c | 5 |
1 files changed, 2 insertions, 3 deletions
diff --git a/source3/smbd/open.c b/source3/smbd/open.c index 17d9f6f8fb..10606788b4 100644 --- a/source3/smbd/open.c +++ b/source3/smbd/open.c @@ -1639,7 +1639,6 @@ static NTSTATUS open_file_ntcreate(connection_struct *conn, bool posix_open = False; bool new_file_created = False; bool clear_ads = false; - struct file_id id; NTSTATUS fsp_open = NT_STATUS_ACCESS_DENIED; mode_t new_unx_mode = (mode_t)0; mode_t unx_mode = (mode_t)0; @@ -1651,8 +1650,6 @@ static NTSTATUS open_file_ntcreate(connection_struct *conn, NTSTATUS status; char *parent_dir; - ZERO_STRUCT(id); - if (conn->printer) { /* * Printers are handled completely differently. @@ -1958,6 +1955,7 @@ static NTSTATUS open_file_ntcreate(connection_struct *conn, struct share_mode_entry *exclusive_entry = NULL; bool got_level2_oplock = false; bool got_a_none_oplock = false; + struct file_id id; struct timespec old_write_time = smb_fname->st.st_ex_mtime; id = vfs_file_id_from_sbuf(conn, &smb_fname->st); @@ -2191,6 +2189,7 @@ static NTSTATUS open_file_ntcreate(connection_struct *conn, bool got_level2_oplock = false; bool got_a_none_oplock = false; struct timespec old_write_time = smb_fname->st.st_ex_mtime; + struct file_id id; /* * Deal with the race condition where two smbd's detect the * file doesn't exist and do the create at the same time. One |