Skip to content

Commit

Permalink
Refactor: Review and fix Wrap multistatement macros in a do-while loop
Browse files Browse the repository at this point in the history
  • Loading branch information
anandamideShakyan authored and aditi-pandit committed Dec 12, 2024
1 parent 41aba92 commit 243ee3d
Showing 1 changed file with 4 additions and 2 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -33,9 +33,11 @@

namespace {
#define REPORT_IF_NOT_ZERO(name, counter) \
if ((counter) != 0) { \
do { \
if ((counter) != 0) { \
RECORD_METRIC_VALUE((name), (counter)); \
}
} \
} while (0)
} // namespace

namespace facebook::presto {
Expand Down

0 comments on commit 243ee3d

Please sign in to comment.