From d53a33b8288d460086513e72273977330d162788 Mon Sep 17 00:00:00 2001 From: "Rune K. Svendsen" Date: Sun, 8 Jun 2014 19:58:03 +0200 Subject: [PATCH] Simplify code, as per laanwj's suggestion --- src/init.cpp | 12 +++++------- 1 file changed, 5 insertions(+), 7 deletions(-) diff --git a/src/init.cpp b/src/init.cpp index 7d918e057b..c0bec88f6b 100644 --- a/src/init.cpp +++ b/src/init.cpp @@ -426,16 +426,14 @@ bool AppInit2(boost::thread_group& threadGroup) #endif #ifndef WIN32 + if (GetBoolArg("-sysperms", false)) { #ifdef ENABLE_WALLET - if (!GetBoolArg("-sysperms", false) || !GetBoolArg("-disablewallet", false)) { - umask(077); - if (GetBoolArg("-sysperms", false)) + if (!GetBoolArg("-disablewallet", false)) return InitError("Error: -sysperms is not allowed in combination with enabled wallet functionality"); - } -#else - if (!GetBoolArg("-sysperms", false)) - umask(077); #endif + } else { + umask(077); + } // Clean shutdown on SIGTERM struct sigaction sa;