X-Git-Url: https://git.lttng.org/?p=lttng-tools.git;a=blobdiff_plain;f=src%2Fbin%2Flttng-sessiond%2Fsnapshot.c;h=6e4a0c3f172a1ca577ae5972cbfbd7343b5bfeea;hp=cc1d242f21aef6b8976c45d396bbb1fcc8ecc6c1;hb=a0377dfefe40662ba7d68617bce6ff467114136c;hpb=cc3b9644f017a91d347d7a414387292e3175635e diff --git a/src/bin/lttng-sessiond/snapshot.c b/src/bin/lttng-sessiond/snapshot.c index cc1d242f2..6e4a0c3f1 100644 --- a/src/bin/lttng-sessiond/snapshot.c +++ b/src/bin/lttng-sessiond/snapshot.c @@ -6,7 +6,6 @@ */ #define _LGPL_SOURCE -#include #include #include #include @@ -178,15 +177,15 @@ void snapshot_delete_output(struct snapshot *snapshot, int ret; struct lttng_ht_iter iter; - assert(snapshot); - assert(snapshot->output_ht); - assert(output); + LTTNG_ASSERT(snapshot); + LTTNG_ASSERT(snapshot->output_ht); + LTTNG_ASSERT(output); iter.iter.node = &output->node.node; rcu_read_lock(); ret = lttng_ht_del(snapshot->output_ht, &iter); rcu_read_unlock(); - assert(!ret); + LTTNG_ASSERT(!ret); /* * This is safe because the ownership of a snapshot object is in a session * for which the session lock need to be acquired to read and modify it. @@ -200,9 +199,9 @@ void snapshot_delete_output(struct snapshot *snapshot, void snapshot_add_output(struct snapshot *snapshot, struct snapshot_output *output) { - assert(snapshot); - assert(snapshot->output_ht); - assert(output); + LTTNG_ASSERT(snapshot); + LTTNG_ASSERT(snapshot->output_ht); + LTTNG_ASSERT(output); rcu_read_lock(); lttng_ht_add_unique_ulong(snapshot->output_ht, &output->node); @@ -219,7 +218,7 @@ void snapshot_add_output(struct snapshot *snapshot, */ void snapshot_output_destroy(struct snapshot_output *obj) { - assert(obj); + LTTNG_ASSERT(obj); if (obj->consumer) { consumer_output_send_destroy_relayd(obj->consumer); @@ -240,8 +239,8 @@ struct snapshot_output *snapshot_find_output_by_name(const char *name, struct lttng_ht_iter iter; struct snapshot_output *output = NULL; - assert(snapshot); - assert(name); + LTTNG_ASSERT(snapshot); + LTTNG_ASSERT(name); cds_lfht_for_each_entry(snapshot->output_ht->ht, &iter.iter, output, node.node) { @@ -267,7 +266,7 @@ struct snapshot_output *snapshot_find_output_by_id(uint32_t id, struct lttng_ht_iter iter; struct snapshot_output *output = NULL; - assert(snapshot); + LTTNG_ASSERT(snapshot); lttng_ht_lookup(snapshot->output_ht, (void *)((unsigned long) id), &iter); node = lttng_ht_iter_get_node_ulong(&iter); @@ -290,7 +289,7 @@ int snapshot_init(struct snapshot *obj) { int ret; - assert(obj); + LTTNG_ASSERT(obj); memset(obj, 0, sizeof(struct snapshot));