aboutsummaryrefslogtreecommitdiff
path: root/singleapplication_p.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'singleapplication_p.cpp')
-rw-r--r--singleapplication_p.cpp8
1 files changed, 3 insertions, 5 deletions
diff --git a/singleapplication_p.cpp b/singleapplication_p.cpp
index a129aa0..884fe63 100644
--- a/singleapplication_p.cpp
+++ b/singleapplication_p.cpp
@@ -118,11 +118,9 @@ void SingleApplicationPrivate::genBlockServerName()
#ifdef Q_OS_UNIX
QByteArray username;
uid_t uid = geteuid();
- if( uid != -1 ) {
- struct passwd *pw = getpwuid(uid);
- if( pw ) {
- username = pw->pw_name;
- }
+ struct passwd *pw = getpwuid(uid);
+ if( pw ) {
+ username = pw->pw_name;
}
if( username.isEmpty() ) {
username = qgetenv("USER");