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 19:29:51 +0000 (15:29 -0400)
commit620b0c362fb2ae104b1545b99a02545ccc11e09d
tree2b8f22f5e22c2fe64db2dbfaa18fb186124dc665
parentddbee47f5457a9f06116a86143e3e4831c5419ce
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.026787 seconds and 5 git commands to generate.