Fix Variable 'nMode' is reassigned
See http://nabble.documentfoundation.org/Cppcheck-Variable-nMode-is-reassigned-in-fstat-cxx-td4030405.html Thank you Stephan! Change-Id: I780d422fe03c4c125cc89fee778d820a20553c1c
This commit is contained in:
parent
bd2302200b
commit
87f9d7da00
1 changed files with 1 additions and 3 deletions
|
@ -108,9 +108,7 @@ sal_uIntPtr FileStat::SetReadOnlyFlag( const DirEntry &rEntry, sal_Bool bRO )
|
|||
mode_t nMode;
|
||||
if (bRO)
|
||||
{
|
||||
nMode = aBuf.st_mode & ~S_IWUSR;
|
||||
nMode = aBuf.st_mode & ~S_IWGRP;
|
||||
nMode = aBuf.st_mode & ~S_IWOTH;
|
||||
nMode = aBuf.st_mode & ~(S_IWUSR | S_IWGRP | S_IWOTH);
|
||||
}
|
||||
else
|
||||
nMode = aBuf.st_mode | S_IWUSR;
|
||||
|
|
Loading…
Reference in a new issue