This:
char names[0][LTTNG_SYMBOL_NAME_LEN];
means that accessing
->names[0][i]
will return the i-th character of the first name.
So doing:
lttng enable-event -u -a --exclude hello,a,b,c,d
lttng save
would result in a saved session XML file containing
this:
<exclusion>hello</exclusion>
<exclusion>ello</exclusion>
<exclusion>llo</exclusion>
<exclusion>lo</exclusion>
<exclusion>o</exclusion>
This is great art, but not what is expected.
Signed-off-by: Philippe Proulx <eeppeliteloop@gmail.com>
Signed-off-by: Jérémie Galarneau <jeremie.galarneau@efficios.com>
for (i = 0; i < event->exclusion->count; i++) {
ret = config_writer_write_element_string(writer,
config_element_exclusion,
- &event->exclusion->names[0][i]);
+ &event->exclusion->names[i][0]);
if (ret) {
ret = LTTNG_ERR_SAVE_IO_FAIL;
goto end;
struct lttng_event_exclusion {
uint32_t count;
char padding[LTTNG_EVENT_EXCLUSION_PADDING];
- char names[LTTNG_SYMBOL_NAME_LEN][0];
+ char names[0][LTTNG_SYMBOL_NAME_LEN];
} LTTNG_PACKED;
/*