X-Git-Url: https://git.lttng.org/?p=lttng-tools.git;a=blobdiff_plain;f=src%2Fcommon%2Ftrigger.c;fp=src%2Fcommon%2Ftrigger.c;h=5c48609ea5f12659c11b2eb50e01d28f5225b34f;hp=a86295069a85c12d1b17ee8bbaa3ade4643fa29c;hb=0efb2ad7fc448283184e43d6fb0915febae45384;hpb=94dbd8e4ed88cd56829159e1fef374a16fddd593 diff --git a/src/common/trigger.c b/src/common/trigger.c index a86295069..5c48609ea 100644 --- a/src/common/trigger.c +++ b/src/common/trigger.c @@ -346,7 +346,12 @@ LTTNG_HIDDEN bool lttng_trigger_is_equal( const struct lttng_trigger *a, const struct lttng_trigger *b) { - if (strcmp(a->name, b->name) != 0) { + if (!!a->name != !!b->name) { + /* Both must be either anonymous or named. */ + return false; + } + + if (a->name && strcmp(a->name, b->name) != 0) { return false; }