Bug 1338086 - Remove useless else blocks in order to reduce complexity in security/sandbox/linux/ r=gcp

MozReview-Commit-ID: 5UWtAe6THd6

--HG--
extra : rebase_source : 17af6640439f209cb37e91552cf0f97043bd9e91
This commit is contained in:
Sylvestre Ledru 2017-02-09 10:56:05 +01:00
Родитель 311d8482c5
Коммит 455bdf24fe
2 изменённых файлов: 12 добавлений и 11 удалений

Просмотреть файл

@ -49,17 +49,17 @@ SandboxChroot::SendCommand(Command aComm)
MOZ_RELEASE_ASSERT(aComm == JUST_EXIT);
MOZ_ALWAYS_ZERO(pthread_mutex_unlock(&mMutex));
return false;
} else {
MOZ_ASSERT(mCommand == NO_COMMAND);
mCommand = aComm;
MOZ_ALWAYS_ZERO(pthread_mutex_unlock(&mMutex));
MOZ_ALWAYS_ZERO(pthread_cond_signal(&mWakeup));
void *retval;
if (pthread_join(mThread, &retval) != 0 || retval != nullptr) {
MOZ_CRASH("Failed to stop privileged chroot thread");
}
MOZ_ASSERT(mCommand == NO_THREAD);
}
MOZ_ASSERT(mCommand == NO_COMMAND);
mCommand = aComm;
MOZ_ALWAYS_ZERO(pthread_mutex_unlock(&mMutex));
MOZ_ALWAYS_ZERO(pthread_cond_signal(&mWakeup));
void *retval;
if (pthread_join(mThread, &retval) != 0 || retval != nullptr) {
MOZ_CRASH("Failed to stop privileged chroot thread");
}
MOZ_ASSERT(mCommand == NO_THREAD);
return true;
}

Просмотреть файл

@ -411,7 +411,8 @@ DoLink(const char* aPath, const char* aPath2,
{
if (aOper == SandboxBrokerCommon::Operation::SANDBOX_FILE_LINK) {
return link(aPath, aPath2);
} else if (aOper == SandboxBrokerCommon::Operation::SANDBOX_FILE_SYMLINK) {
}
if (aOper == SandboxBrokerCommon::Operation::SANDBOX_FILE_SYMLINK) {
return symlink(aPath, aPath2);
}
MOZ_CRASH("SandboxBroker: Unknown link operation");