Replace "truncating" variable reference with what it was defined
as. We use "(flags & O_TRUNC)" a few lines above, so it can't be that
bad.
After we set it to "false" further down, it was never used again.
Signed-off-by: Volker Lendecke <vl@samba.org>
Reviewed-by: Ralph Boehme <slow@samba.org>
FILE_EXECUTE |
SEC_FLAG_SYSTEM_SECURITY;
bool creating = !file_existed && (flags & O_CREAT);
- bool truncating = (flags & O_TRUNC);
bool open_fd = false;
bool posix_open = (fsp->posix_flags & FSP_POSIX_FLAGS_OPEN);
local_flags = (flags & ~O_ACCMODE)|O_RDWR;
}
- if ((open_access_mask & need_fd_mask) || creating || truncating) {
+ if ((open_access_mask & need_fd_mask) || creating ||
+ (flags & O_TRUNC)) {
open_fd = true;
}
if (file_existed && S_ISFIFO(smb_fname->st.st_ex_mode)) {
local_flags &= ~O_TRUNC; /* Can't truncate a FIFO. */
local_flags |= O_NONBLOCK;
- truncating = false;
}
#endif