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:
Julien Nabet 2013-01-21 21:19:02 +01:00
parent bd2302200b
commit 87f9d7da00

View file

@ -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;