Skip to content

Commit

Permalink
clkmgr: Fix incorrect if statment checking
Browse files Browse the repository at this point in the history
Fix incorrect if stamtent checking and simplify boolean expressions to
improve code readability and maintainability.

Signed-off-by: Lai Peter Jun Ann <[email protected]>
  • Loading branch information
Lai Peter Jun Ann authored and yoongsiang2 committed Dec 11, 2024
1 parent e5953aa commit c99f8a9
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions clkmgr/sample/clkmgr_test.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -147,7 +147,7 @@ int main(int argc, char *argv[])
}


if (!cm.clkmgr_connect() == false) {
if (!cm.clkmgr_connect()) {
std::cout << "[clkmgr] failure in connecting !!!\n";
ret = EXIT_FAILURE;
goto do_exit;
Expand All @@ -170,7 +170,7 @@ int main(int argc, char *argv[])
std::cout << "GM Offset upper limit: " << std::dec << gmOffsetUpperLimit << " ns\n";
std::cout << "GM Offset lower limit: " << std::dec << gmOffsetLowerLimit << " ns\n\n";

if (cm.clkmgr_subscribe(subscription, eventState) == false) {
if (!cm.clkmgr_subscribe(subscription, eventState)) {
std::cerr << "[clkmgr] Failure in subscribing to clkmgr Proxy !!!\n";
cm.clkmgr_disconnect();
return EXIT_FAILURE;
Expand Down

0 comments on commit c99f8a9

Please sign in to comment.