From: Mathieu Desnoyers Date: Wed, 26 Jan 2022 15:53:55 +0000 (-0500) Subject: Fix: _lttng_variant_statedump should expect lttng_ust_ctl_atype_variant_nestable X-Git-Tag: v2.13.3~1 X-Git-Url: https://git.lttng.org./?a=commitdiff_plain;h=73cbc1b769ac1dbe2744e627e4774de412b18d6d;p=lttng-tools.git Fix: _lttng_variant_statedump should expect lttng_ust_ctl_atype_variant_nestable The precondition check in _lttng_variant_statedump is too strict: it should also expect lttng_ust_ctl_atype_variant_nestable. Remove this check entirely, which is redundant with the switch/case in the only caller sites in the same compile unit. Signed-off-by: Mathieu Desnoyers Signed-off-by: Jérémie Galarneau Change-Id: I744cc5cef69ff29f8d7ecc1cf01c9a629c6e222e --- diff --git a/src/bin/lttng-sessiond/ust-metadata.c b/src/bin/lttng-sessiond/ust-metadata.c index 6c807ccee..d8f1c842b 100644 --- a/src/bin/lttng-sessiond/ust-metadata.c +++ b/src/bin/lttng-sessiond/ust-metadata.c @@ -369,10 +369,6 @@ int _lttng_variant_statedump(struct ust_registry_session *session, int ret; char identifier[LTTNG_UST_ABI_SYM_NAME_LEN]; - if (variant->type.atype != lttng_ust_ctl_atype_variant) { - ret = -EINVAL; - goto end; - } (*iter_field)++; sanitize_ctf_identifier(identifier, tag_name); if (alignment) {