X-Git-Url: https://git.lttng.org/?p=lttng-tools.git;a=blobdiff_plain;f=src%2Fcommon%2Ftracker.cpp;fp=src%2Fcommon%2Ftracker.cpp;h=1f292a3f02981653fd90682bc88e6733c45d98b4;hp=d6669b6f87eabb1a2b3829f106b1b05c9d5c5a69;hb=cd9adb8b829564212158943a0d279bb35322ab30;hpb=e665dfbce25215d5ec77ff03a279c7163b337db1 diff --git a/src/common/tracker.cpp b/src/common/tracker.cpp index d6669b6f8..1f292a3f0 100644 --- a/src/common/tracker.cpp +++ b/src/common/tracker.cpp @@ -67,7 +67,7 @@ process_attr_value_from_comm(enum lttng_domain_type domain, const struct lttng_buffer_view *value_view, struct process_attr_value **_value) { - char *name = NULL; + char *name = nullptr; enum lttng_error_code ret = LTTNG_OK; struct process_attr_value *value = zmalloc(); @@ -133,7 +133,7 @@ process_attr_value_from_comm(enum lttng_domain_type domain, } value->value.user_name = name; - name = NULL; + name = nullptr; break; default: ERR("Invalid value type used for user ID process attribute"); @@ -154,7 +154,7 @@ process_attr_value_from_comm(enum lttng_domain_type domain, } value->value.group_name = name; - name = NULL; + name = nullptr; break; default: ERR("Invalid value type used for group ID process attribute"); @@ -168,7 +168,7 @@ process_attr_value_from_comm(enum lttng_domain_type domain, } *_value = value; - value = NULL; + value = nullptr; free(name); return LTTNG_OK; error: @@ -204,7 +204,7 @@ static void process_attr_tracker_value_destructor(void *ptr) process_attr_value_destroy(value); } -struct lttng_process_attr_values *lttng_process_attr_values_create(void) +struct lttng_process_attr_values *lttng_process_attr_values_create() { struct lttng_process_attr_values *values = zmalloc(); @@ -238,7 +238,7 @@ static int process_attr_tracker_value_serialize(const struct process_attr_value .type = (int32_t) value->type, .value = {}, }; - const char *name = NULL; + const char *name = nullptr; switch (value->type) { case LTTNG_PROCESS_ATTR_VALUE_TYPE_PID: @@ -398,7 +398,7 @@ void lttng_process_attr_values_destroy(struct lttng_process_attr_values *values) struct process_attr_value *process_attr_value_copy(const struct process_attr_value *value) { - struct process_attr_value *new_value = NULL; + struct process_attr_value *new_value = nullptr; if (!value) { goto end; @@ -428,7 +428,7 @@ end: return new_value; error: free(new_value); - return NULL; + return nullptr; } unsigned long process_attr_value_hash(const struct process_attr_value *a)