From e80c56e249500496c43e670de60811cfb51a47e1 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?P=C5=99emysl=20Janouch?=
Date: Thu, 1 Nov 2018 22:19:31 +0100
Subject: [PATCH] Cleanup
---
sdn.cpp | 11 +++++------
1 file changed, 5 insertions(+), 6 deletions(-)
diff --git a/sdn.cpp b/sdn.cpp
index 56c8326..d91444a 100644
--- a/sdn.cpp
+++ b/sdn.cpp
@@ -140,7 +140,7 @@ fun decode_type (mode_t m) -> wchar_t {
/// Return the modes of a file in the usual stat/ls format
fun decode_mode (mode_t m) -> wstring {
- return { decode_type (m),
+ return {decode_type (m),
L"r-"[!(m & S_IRUSR)],
L"w-"[!(m & S_IWUSR)],
((m & S_ISUID) ? L"sS" : L"x-")[!(m & S_IXUSR)],
@@ -149,8 +149,7 @@ fun decode_mode (mode_t m) -> wstring {
((m & S_ISGID) ? L"sS" : L"x-")[!(m & S_IXGRP)],
L"r-"[!(m & S_IROTH)],
L"w-"[!(m & S_IWOTH)],
- ((m & S_ISVTX) ? L"tT" : L"x-")[!(m & S_IXOTH)],
- };
+ ((m & S_ISVTX) ? L"tT" : L"x-")[!(m & S_IXOTH)]};
}
template