X-Git-Url: https://git.lttng.org/?a=blobdiff_plain;f=src%2Fbin%2Flttng-sessiond%2Fsnapshot.c;fp=src%2Fbin%2Flttng-sessiond%2Fsnapshot.c;h=ba7cdff2c3a52b3415e464ca8605b71099f7aaaf;hb=ee91bab210156bd9a4ec23eac93aa563556f2803;hp=77255fa2c597f0440e72e8585be486c64e6ef369;hpb=26fe59386444e0c932b5adcd5f9d6f9f114dd1e2;p=lttng-tools.git diff --git a/src/bin/lttng-sessiond/snapshot.c b/src/bin/lttng-sessiond/snapshot.c index 77255fa2c..ba7cdff2c 100644 --- a/src/bin/lttng-sessiond/snapshot.c +++ b/src/bin/lttng-sessiond/snapshot.c @@ -55,7 +55,7 @@ int snapshot_output_init(uint64_t max_size, const char *name, } lttng_ht_node_init_ulong(&output->node, (unsigned long) output->id); - if (name) { + if (name && name[0] != '\0') { strncpy(output->name, name, sizeof(output->name)); } else { /* Set default name. */