From: Philippe Proulx Date: Wed, 26 Aug 2015 05:20:24 +0000 (-0400) Subject: Add LTTNG_EVENT_EXCLUSION_NAME_AT() helper macro X-Git-Tag: v2.8.0-rc1~233 X-Git-Url: https://git.lttng.org./?a=commitdiff_plain;h=d7af356516e141af378869ba9a21a623439ccdcb;p=lttng-tools.git Add LTTNG_EVENT_EXCLUSION_NAME_AT() helper macro Signed-off-by: Philippe Proulx Signed-off-by: Jérémie Galarneau --- diff --git a/src/bin/lttng-sessiond/save.c b/src/bin/lttng-sessiond/save.c index 065fb3f02..a6fea46ce 100644 --- a/src/bin/lttng-sessiond/save.c +++ b/src/bin/lttng-sessiond/save.c @@ -674,7 +674,8 @@ int save_ust_event(struct config_writer *writer, for (i = 0; i < event->exclusion->count; i++) { ret = config_writer_write_element_string(writer, config_element_exclusion, - &event->exclusion->names[i][0]); + LTTNG_EVENT_EXCLUSION_NAME_AT( + event->exclusion, i)); if (ret) { ret = LTTNG_ERR_SAVE_IO_FAIL; goto end; diff --git a/src/common/sessiond-comm/sessiond-comm.h b/src/common/sessiond-comm/sessiond-comm.h index 1e0ee5d45..79091e348 100644 --- a/src/common/sessiond-comm/sessiond-comm.h +++ b/src/common/sessiond-comm/sessiond-comm.h @@ -336,6 +336,9 @@ struct lttng_event_exclusion { char names[0][LTTNG_SYMBOL_NAME_LEN]; } LTTNG_PACKED; +#define LTTNG_EVENT_EXCLUSION_NAME_AT(_exclusion, _i) \ + (&(_exclusion)->names[_i][0]) + /* * Data structure for the response from sessiond to the lttng client. */