[PATCH/RFC 2/7] Cleanup: Remove unnecessary if-else clause

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



Signed-off-by: Johan Herland <johan@xxxxxxxxxxx>
---
 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




--
To unsubscribe from this list: send the line "unsubscribe git" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at  http://vger.kernel.org/majordomo-info.html

[Index of Archives]     [Linux Kernel Development]     [Gcc Help]     [IETF Annouce]     [DCCP]     [Netdev]     [Networking]     [Security]     [V4L]     [Bugtraq]     [Yosemite]     [MIPS Linux]     [ARM Linux]     [Linux Security]     [Linux RAID]     [Linux SCSI]     [Fedora Users]

  Powered by Linux