Removed pointless conditional.
Mode is always != 0 at this point (QLocalServer::WorldAccessOption is a combination of the bits tested later). Change-Id: I5abfb4e49fdc7903e21398525af05989f40d7f94 Reviewed-by: Oswald Buddenhagen <oswald.buddenhagen@theqtcompany.com> Reviewed-by: BogDan Vatra <bogdan@kde.org>
This commit is contained in:
parent
80d31849e2
commit
4b8d4034d7
@ -171,12 +171,10 @@ bool QLocalServerPrivate::listen(const QString &requestedServerName)
|
||||
if (socketOptions & QLocalServer::OtherAccessOption)
|
||||
mode |= S_IRWXO;
|
||||
|
||||
if (mode) {
|
||||
if (::chmod(tempPath.toLatin1(), mode) == -1) {
|
||||
setError(QLatin1String("QLocalServer::listen"));
|
||||
closeServer();
|
||||
return false;
|
||||
}
|
||||
if (::chmod(tempPath.toLatin1(), mode) == -1) {
|
||||
setError(QLatin1String("QLocalServer::listen"));
|
||||
closeServer();
|
||||
return false;
|
||||
}
|
||||
|
||||
if (::rename(tempPath.toLatin1(), fullServerName.toLatin1()) == -1) {
|
||||
|
Loading…
Reference in New Issue
Block a user