diff options
author | Julien Nabet <serval2412@yahoo.fr> | 2013-01-21 21:19:02 +0100 |
---|---|---|
committer | Julien Nabet <serval2412@yahoo.fr> | 2013-01-21 21:19:02 +0100 |
commit | 87f9d7da00857c649784a7d9eca046bf6e71ae3c (patch) | |
tree | bcb74a107090ed15ecfaeffbac71fe4b5cf740ba | |
parent | bd2302200b7bc8005662b7034346866ae22da38b (diff) |
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
-rw-r--r-- | tools/source/fsys/fstat.cxx | 4 |
1 files changed, 1 insertions, 3 deletions
diff --git a/tools/source/fsys/fstat.cxx b/tools/source/fsys/fstat.cxx index 19f51a7e0b3a..bf1c6b788f41 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; |