X-Git-Url: https://git.liburcu.org/?a=blobdiff_plain;f=src%2Fcommon%2Foptional.h;h=dcb7ca8639fd67ddac916ea84816e24e0b2b2b5e;hb=a0377dfefe40662ba7d68617bce6ff467114136c;hp=ca7d1f043d21bdef1b9ad8dc716452ee49fe7858;hpb=cc3b9644f017a91d347d7a414387292e3175635e;p=lttng-tools.git diff --git a/src/common/optional.h b/src/common/optional.h index ca7d1f043..dcb7ca863 100644 --- a/src/common/optional.h +++ b/src/common/optional.h @@ -9,7 +9,6 @@ #define LTTNG_OPTIONAL_H #include -#include /* * Define wrapper structure representing an optional value. @@ -56,25 +55,25 @@ /* * This macro is available as a 'convenience' to allow sites that assume - * an optional value is set to assert() that it is set when accessing it. + * an optional value is set to LTTNG_ASSERT() that it is set when accessing it. * * Since this returns the 'optional' by value, it is not suitable for all * wrapped optional types. It is meant to be used with PODs. */ #define LTTNG_OPTIONAL_GET(optional) \ ({ \ - assert((optional).is_set); \ + LTTNG_ASSERT((optional).is_set); \ (optional).value; \ }) /* * This macro is available as a 'convenience' to allow sites that assume - * an optional value is set to assert() that it is set when fecthing the + * an optional value is set to LTTNG_ASSERT() that it is set when fecthing the * underlying value's address. */ #define LTTNG_OPTIONAL_GET_PTR(optional) \ ({ \ - assert((optional).is_set); \ + LTTNG_ASSERT((optional).is_set); \ &(optional).value; \ })