projects
/
lttng-tools.git
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
|
inline
| side by side
Clean-up: lttng: utils: coding style fix
[lttng-tools.git]
/
src
/
common
/
event-rule
/
user-tracepoint.cpp
diff --git
a/src/common/event-rule/user-tracepoint.cpp
b/src/common/event-rule/user-tracepoint.cpp
index 20993e12b397b36e1dc41d5feae78e0ab515bfc8..e892b0ce89cf4d2c3274f2785226d76bd77e5431 100644
(file)
--- a/
src/common/event-rule/user-tracepoint.cpp
+++ b/
src/common/event-rule/user-tracepoint.cpp
@@
-149,6
+149,7
@@
static int lttng_event_rule_user_tracepoint_serialize(const struct lttng_event_r
for (i = 0; i < exclusion_count; i++) {
size_t len;
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(
const char *exclusion;
status = lttng_event_rule_user_tracepoint_get_name_pattern_exclusion_at_index(
@@
-156,8
+157,11
@@
static int lttng_event_rule_user_tracepoint_serialize(const struct lttng_event_r
LTTNG_ASSERT(status == LTTNG_EVENT_RULE_STATUS_OK);
len = strlen(exclusion) + 1;
LTTNG_ASSERT(status == LTTNG_EVENT_RULE_STATUS_OK);
len = strlen(exclusion) + 1;
+
+ serialized_len = len;
/* Append exclusion length, includes the null terminator. */
/* 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;
}
if (ret) {
goto end;
}
@@
-208,12
+212,12
@@
static bool lttng_event_rule_user_tracepoint_is_equal(const struct lttng_event_r
/* Long check. */
LTTNG_ASSERT(a->pattern);
LTTNG_ASSERT(b->pattern);
/* 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) {
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) {
goto end;
}
} else if (!!a->filter_expression != !!b->filter_expression) {
@@
-234,7
+238,7
@@
static bool lttng_event_rule_user_tracepoint_is_equal(const struct lttng_event_r
status = lttng_event_rule_user_tracepoint_get_name_pattern_exclusion_at_index(
_b, i, &exclusion_b);
LTTNG_ASSERT(status == LTTNG_EVENT_RULE_STATUS_OK);
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;
}
}
goto end;
}
}
This page took
0.023597 seconds
and
4
git commands to generate.