X-Git-Url: http://git.lttng.org./?a=blobdiff_plain;f=src%2Fcommon%2Fconditions%2Fbuffer-usage.cpp;h=c78528735063cb261a0f4830fb023131397cd496;hb=dcffe9462d11f9de5b441b801da5b2b7ae42c79a;hp=e1af44b1c2eb0d4de73c28fa5f83b783538fbda1;hpb=28ab034a2c3582d07d3423d2d746731f87d3969f;p=lttng-tools.git diff --git a/src/common/conditions/buffer-usage.cpp b/src/common/conditions/buffer-usage.cpp index e1af44b1c..c78528735 100644 --- a/src/common/conditions/buffer-usage.cpp +++ b/src/common/conditions/buffer-usage.cpp @@ -160,13 +160,13 @@ static bool lttng_condition_buffer_usage_is_equal(const struct lttng_condition * /* Condition is not valid if this is not true. */ LTTNG_ASSERT(a->session_name); LTTNG_ASSERT(b->session_name); - if (strcmp(a->session_name, b->session_name)) { + if (strcmp(a->session_name, b->session_name) != 0) { goto end; } LTTNG_ASSERT(a->channel_name); LTTNG_ASSERT(b->channel_name); - if (strcmp(a->channel_name, b->channel_name)) { + if (strcmp(a->channel_name, b->channel_name) != 0) { goto end; } @@ -187,12 +187,12 @@ lttng_condition_buffer_usage_mi_serialize(const struct lttng_condition *conditio int ret; enum lttng_error_code ret_code; enum lttng_condition_status status; - const char *session_name = NULL, *channel_name = NULL; + const char *session_name = nullptr, *channel_name = nullptr; enum lttng_domain_type domain_type; bool is_threshold_bytes = false; double threshold_ratio; uint64_t threshold_bytes; - const char *condition_type_str = NULL; + const char *condition_type_str = nullptr; LTTNG_ASSERT(condition); LTTNG_ASSERT(IS_USAGE_CONDITION(condition)); @@ -299,7 +299,7 @@ static struct lttng_condition *lttng_condition_buffer_usage_create(enum lttng_co condition = zmalloc(); if (!condition) { - return NULL; + return nullptr; } lttng_condition_init(&condition->parent, type); @@ -477,7 +477,7 @@ static struct lttng_evaluation *create_evaluation_from_payload(enum lttng_condit struct lttng_payload_view *view) { const struct lttng_evaluation_buffer_usage_comm *comm = (typeof(comm)) view->buffer.data; - struct lttng_evaluation *evaluation = NULL; + struct lttng_evaluation *evaluation = nullptr; if (view->buffer.size < sizeof(*comm)) { goto end; @@ -493,7 +493,7 @@ ssize_t lttng_evaluation_buffer_usage_low_create_from_payload(struct lttng_paylo struct lttng_evaluation **_evaluation) { ssize_t ret; - struct lttng_evaluation *evaluation = NULL; + struct lttng_evaluation *evaluation = nullptr; if (!_evaluation) { ret = -1; @@ -519,7 +519,7 @@ lttng_evaluation_buffer_usage_high_create_from_payload(struct lttng_payload_view struct lttng_evaluation **_evaluation) { ssize_t ret; - struct lttng_evaluation *evaluation = NULL; + struct lttng_evaluation *evaluation = nullptr; if (!_evaluation) { ret = -1;