pthread_mutex_lock(&seed_lock);
if (!seed_init) {
- lttng_ht_seed = (unsigned long) time(NULL);
+ lttng_ht_seed = (unsigned long) time(nullptr);
seed_init = true;
}
pthread_mutex_unlock(&seed_lock);
ht = zmalloc<lttng_ht>();
- if (ht == NULL) {
+ if (ht == nullptr) {
PERROR("zmalloc lttng_ht");
goto error;
}
min_hash_alloc_size,
max_hash_buckets_size,
CDS_LFHT_AUTO_RESIZE | CDS_LFHT_ACCOUNTING,
- NULL);
+ nullptr);
/*
* There is already an assert in the RCU hashtable code so if the ht is
* NULL here there is a *huge* problem.
return ht;
error:
- return NULL;
+ return nullptr;
}
/*
{
int ret;
- ret = cds_lfht_destroy(ht->ht, NULL);
+ ret = cds_lfht_destroy(ht->ht, nullptr);
LTTNG_ASSERT(!ret);
free(ht);
}
&node->node);
rcu_read_unlock();
if (!node_ptr) {
- return NULL;
+ return nullptr;
} else {
return lttng::utils::container_of(node_ptr, <tng_ht_node_ulong::node);
}
&node->node);
rcu_read_unlock();
if (!node_ptr) {
- return NULL;
+ return nullptr;
} else {
return lttng::utils::container_of(node_ptr, <tng_ht_node_u64::node);
}
LTTNG_ASSERT(iter);
node = cds_lfht_iter_get_node(&iter->iter);
if (!node) {
- return NULL;
+ return nullptr;
}
return lttng::utils::container_of(node, <tng_ht_node_str::node);
}
LTTNG_ASSERT(iter);
node = cds_lfht_iter_get_node(&iter->iter);
if (!node) {
- return NULL;
+ return nullptr;
}
return lttng::utils::container_of(node, <tng_ht_node_ulong::node);
}
LTTNG_ASSERT(iter);
node = cds_lfht_iter_get_node(&iter->iter);
if (!node) {
- return NULL;
+ return nullptr;
}
return lttng::utils::container_of(node, <tng_ht_node_u64::node);
}
LTTNG_ASSERT(iter);
node = cds_lfht_iter_get_node(&iter->iter);
if (!node) {
- return NULL;
+ return nullptr;
}
return lttng::utils::container_of(node, <tng_ht_node_two_u64::node);
}