[PATCH/RFC 2/7] Cleanup: Remove unnecessary if-else clause
Signed-off-by: Johan Herland <johan@herland.net>
---
path.c | 14 ++++----------
1 files changed, 4 insertions(+), 10 deletions(-)
diff --git a/path.c b/path.c
index e332b50..28e50d3 100644
--- a/path.c
+++ b/path.c
@@ -322,16 +322,10 @@ int adjust_shared_perm(const char *path)
return -1;
mode = st.st_mode;
- if (shared_repository) {
- int tweak = shared_repository;
- if (!(mode & S_IWUSR))
- tweak &= ~0222;
- mode |= tweak;
- } else {
- /* Preserve old PERM_UMASK behaviour */
- if (mode & S_IWUSR)
- mode |= S_IWGRP;
- }
+ int tweak = shared_repository;
+ if (!(mode & S_IWUSR))
+ tweak &= ~0222;
+ mode |= tweak;
if (S_ISDIR(mode)) {
mode |= FORCE_DIR_SET_GID;
--
1.6.2.1.473.g92672