Fix: statements with side-effects in assert statements
authorFrancis Deslauriers <francis.deslauriers@efficios.com>
Thu, 19 Aug 2021 21:14:46 +0000 (17:14 -0400)
committerJérémie Galarneau <jeremie.galarneau@efficios.com>
Thu, 23 Sep 2021 18:46:46 +0000 (14:46 -0400)
commitcc3b9644f017a91d347d7a414387292e3175635e
tree3935d98a0bc6411d3186a99089bcc7e21ec2fbaf
parentd37406195ec30adfb1bd903e3ee8dfdda79700ef
Fix: statements with side-effects in assert statements

Background
==========
When building with the NDEBUG definition the `assert()` statements are
removed.

Issue
=====
Currently, a few `assert()` statements in the code base contain
statements that have side effects and removing them changes the
behavior for the program.

Fix
===
Extract the statements with side effects out of the `assert()`
statements.

Signed-off-by: Francis Deslauriers <francis.deslauriers@efficios.com>
Signed-off-by: Jérémie Galarneau <jeremie.galarneau@efficios.com>
Change-Id: I0b11c8e25c3380563332b4c0fad15f70b09a7335
src/bin/lttng-sessiond/agent-thread.c
src/bin/lttng-sessiond/ust-app.c
tests/unit/test_fd_tracker.c
This page took 0.026463 seconds and 5 git commands to generate.