X-Git-Url: https://git.lttng.org/?p=lttng-tools.git;a=blobdiff_plain;f=src%2Fcommon%2Foptional.hpp;fp=src%2Fcommon%2Foptional.hpp;h=4bb774739a8aa870c03aa328040690e9a725e3a8;hp=f34c5991fdfd4be070a1362d1968c4b3b88d2526;hb=5c7248cd5bce45bf64d563fb4e130a63bf345f11;hpb=cd9adb8b829564212158943a0d279bb35322ab30 diff --git a/src/common/optional.hpp b/src/common/optional.hpp index f34c5991f..4bb774739 100644 --- a/src/common/optional.hpp +++ b/src/common/optional.hpp @@ -88,7 +88,10 @@ /* * Initialize an optional field as 'set' with a given value. */ -#define LTTNG_OPTIONAL_INIT_VALUE(val) { .is_set = 1, .value = val } +#define LTTNG_OPTIONAL_INIT_VALUE(val) \ + { \ + .is_set = 1, .value = (val) \ + } /* Set the value of an optional field. */ #define LTTNG_OPTIONAL_SET(field_ptr, val) \