lttng_ht_lookup(ht, (void *) name, &iter);
node = lttng_ht_iter_get_node_str(&iter);
- if (node == NULL) {
+ if (node == nullptr) {
goto error;
}
error:
DBG2("Trace UST channel %s not found by name", name);
- return NULL;
+ return nullptr;
}
/*
&key,
&iter.iter);
node = lttng_ht_iter_get_node_str(&iter);
- if (node == NULL) {
+ if (node == nullptr) {
goto error;
}
error:
DBG2("Trace UST event %s NOT found", key.name);
- return NULL;
+ return nullptr;
}
/*
struct agent *trace_ust_find_agent(struct ltt_ust_session *session,
enum lttng_domain_type domain_type)
{
- struct agent *agt = NULL;
+ struct agent *agt = nullptr;
struct lttng_ht_node_u64 *node;
struct lttng_ht_iter iter;
uint64_t key;
/* Allocate a new ltt ust session */
lus = zmalloc<ltt_ust_session>();
- if (lus == NULL) {
+ if (lus == nullptr) {
PERROR("create ust session zmalloc");
goto error_alloc;
}
goto error;
}
lus->consumer = consumer_create_output(CONSUMER_DST_LOCAL);
- if (lus->consumer == NULL) {
+ if (lus->consumer == nullptr) {
goto error;
}
lttng_ht_destroy(lus->agents);
free(lus);
error_alloc:
- return NULL;
+ return nullptr;
}
/*
LTTNG_ASSERT(chan);
luc = zmalloc<ltt_ust_channel>();
- if (luc == NULL) {
+ if (luc == nullptr) {
PERROR("ltt_ust_channel zmalloc");
goto error;
}
}
local_ust_event = zmalloc<ltt_ust_event>();
- if (local_ust_event == NULL) {
+ if (local_ust_event == nullptr) {
PERROR("ust event zmalloc");
ret = LTTNG_ERR_NOMEM;
goto error;
*/
struct ltt_ust_context *trace_ust_create_context(const struct lttng_event_context *ctx)
{
- struct ltt_ust_context *uctx = NULL;
+ struct ltt_ust_context *uctx = nullptr;
int utype;
LTTNG_ASSERT(ctx);
break;
case LTTNG_UST_ABI_CONTEXT_APP_CONTEXT:
{
- char *provider_name = NULL, *ctx_name = NULL;
+ char *provider_name = nullptr, *ctx_name = nullptr;
provider_name = strdup(ctx->u.app_ctx.provider_name);
if (!provider_name) {
return uctx;
error:
trace_ust_destroy_context(uctx);
- return NULL;
+ return nullptr;
}
static void destroy_id_tracker_node_rcu(struct rcu_head *head)
}
rcu_read_unlock();
lttng_ht_destroy(id_tracker->ht);
- id_tracker->ht = NULL;
+ id_tracker->ht = nullptr;
}
static struct ust_id_tracker_node *
if (node) {
return lttng::utils::container_of(node, &ust_id_tracker_node::node);
} else {
- return NULL;
+ return nullptr;
}
}
case LTTNG_PROCESS_ATTR_VIRTUAL_GROUP_ID:
return &session->vgid_tracker;
default:
- return NULL;
+ return nullptr;
}
}
case LTTNG_PROCESS_ATTR_VIRTUAL_GROUP_ID:
return session->tracker_vgid;
default:
- return NULL;
+ return nullptr;
}
}
int trace_ust_regenerate_metadata(struct ltt_ust_session *usess)
{
int ret = 0;
- struct buffer_reg_uid *uid_reg = NULL;
- struct buffer_reg_session *session_reg = NULL;
+ struct buffer_reg_uid *uid_reg = nullptr;
+ struct buffer_reg_session *session_reg = nullptr;
rcu_read_lock();
cds_list_for_each_entry (uid_reg, &usess->buffer_reg_uid_list, lnode) {