[Libreoffice-commits] .: tools/source
Libreoffice Gerrit user
logerrit at kemper.freedesktop.org
Mon Jan 21 12:21:26 PST 2013
tools/source/fsys/fstat.cxx | 4 +---
1 file changed, 1 insertion(+), 3 deletions(-)
New commits:
commit 87f9d7da00857c649784a7d9eca046bf6e71ae3c
Author: Julien Nabet <serval2412 at yahoo.fr>
Date: Mon Jan 21 21:19:02 2013 +0100
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
diff --git a/tools/source/fsys/fstat.cxx b/tools/source/fsys/fstat.cxx
index 19f51a7..bf1c6b7 100644
--- a/tools/source/fsys/fstat.cxx
+++ b/tools/source/fsys/fstat.cxx
@@ -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;
More information about the Libreoffice-commits
mailing list