Skip to content

Commit

Permalink
tidy: Explicitly check the return value of some system calls.
Browse files Browse the repository at this point in the history
These problems were pointed out by clang-tidy's "implicit boolean
conversion" check.  Changes made by the clang-tidy program.

https://clang.llvm.org/extra/clang-tidy/checks/readability-implicit-bool-conversion.html
  • Loading branch information
linuxdude42 committed Mar 26, 2019
1 parent f13e3fb commit efafd4e
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion mythtv/libs/libmythbase/mythsystemlegacy.cpp
Expand Up @@ -157,7 +157,7 @@ void MythSystemLegacy::SetCommand(const QString &command,
}

// check for execute rights
if (!GetSetting("UseShell") && access(command.toUtf8().constData(), X_OK))
if (!GetSetting("UseShell") && (access(command.toUtf8().constData(), X_OK)) != 0)
{
LOG(VB_GENERAL, LOG_ERR,
QString("MythSystemLegacy(%1) command not executable, ")
Expand Down

0 comments on commit efafd4e

Please sign in to comment.