Skip to content

Commit

Permalink
tidy: Explicitly test the return value of calling myth_system.
Browse files Browse the repository at this point in the history
The clang-tidy "implicit boolean conversion" check pointed out one
spot where the return value of myth_system was implicitly converted
into a boolean result.  Fix to explicitly check the return value
against zero.  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 Apr 3, 2019
1 parent a18f476 commit 962e485
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion mythtv/libs/libmythbase/mythmiscutil.cpp
Expand Up @@ -660,7 +660,7 @@ bool WakeOnLAN(QString MAC)
bool MythWakeup(const QString &wakeUpCommand, uint flags, uint timeout)
{
if (!IsMACAddress(wakeUpCommand))
return !myth_system(wakeUpCommand, flags, timeout);
return myth_system(wakeUpCommand, flags, timeout) == 0U;

return WakeOnLAN(wakeUpCommand);
}
Expand Down

0 comments on commit 962e485

Please sign in to comment.