Fix compile error

This commit is contained in:
Erik de Castro Lopo 2018-02-24 11:44:07 +11:00
parent cbd742ebb5
commit d2a331c376
1 changed files with 1 additions and 1 deletions

View File

@ -175,7 +175,7 @@ App::initApp(int argc, const char** argv)
// this is a simple way to allow the core process to talk to X. this avoids
// the "WARNING: primary screen unavailable: unable to open screen" error.
// a better way would be to use xauth cookie and dbus to get access to X.
if (static_cast<int>((!(argsBase().m_runAsUid) == 0 != -1))) {
if (argsBase().m_runAsUid >= 0) {
if (setuid(argsBase().m_runAsUid) == 0) {
LOG((CLOG_DEBUG "process uid was set to: %d", argsBase().m_runAsUid));
}