From: Johan Herland Date: Wed, 25 Mar 2009 21:38:30 GMT Subject: [PATCH/RFC 2/7] Cleanup: Remove unnecessary if-else clause Message-ID: <200903252238.30928.johan@herland.net> In-Reply-To: <200903252236.03010.johan@herland.net> Signed-off-by: Johan Herland --- 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