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:35:07 +0000 (15:35 -0400)
commite0ad3e31a29af205ab5b9d73d9866410c6d3ee03
treea281d3c3461a36f2b39f695be47fa387ca1f3411
parentb0563feda603e2f21fb331adb4994edf4080f891
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
tests/unit/test_fd_tracker.c
This page took 0.027561 seconds and 5 git commands to generate.