for (i = 0; i < exclusion_count; i++) {
size_t len;
+ uint32_t serialized_len;
const char *exclusion;
status = lttng_event_rule_user_tracepoint_get_name_pattern_exclusion_at_index(
LTTNG_ASSERT(status == LTTNG_EVENT_RULE_STATUS_OK);
len = strlen(exclusion) + 1;
+
+ serialized_len = len;
/* Append exclusion length, includes the null terminator. */
- ret = lttng_dynamic_buffer_append(&payload->buffer, &len, sizeof(uint32_t));
+ ret = lttng_dynamic_buffer_append(
+ &payload->buffer, &serialized_len, sizeof(serialized_len));
if (ret) {
goto end;
}
/* Long check. */
LTTNG_ASSERT(a->pattern);
LTTNG_ASSERT(b->pattern);
- if (strcmp(a->pattern, b->pattern)) {
+ if (strcmp(a->pattern, b->pattern) != 0) {
goto end;
}
if (a->filter_expression && b->filter_expression) {
- if (strcmp(a->filter_expression, b->filter_expression)) {
+ if (strcmp(a->filter_expression, b->filter_expression) != 0) {
goto end;
}
} else if (!!a->filter_expression != !!b->filter_expression) {
status = lttng_event_rule_user_tracepoint_get_name_pattern_exclusion_at_index(
_b, i, &exclusion_b);
LTTNG_ASSERT(status == LTTNG_EVENT_RULE_STATUS_OK);
- if (strcmp(exclusion_a, exclusion_b)) {
+ if (strcmp(exclusion_a, exclusion_b) != 0) {
goto end;
}
}