Fix: _lttng_variant_statedump should expect lttng_ust_ctl_atype_variant_nestable
authorMathieu Desnoyers <mathieu.desnoyers@efficios.com>
Wed, 26 Jan 2022 15:53:55 +0000 (10:53 -0500)
committerJérémie Galarneau <jeremie.galarneau@efficios.com>
Wed, 26 Jan 2022 22:29:27 +0000 (17:29 -0500)
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 <mathieu.desnoyers@efficios.com>
Signed-off-by: Jérémie Galarneau <jeremie.galarneau@efficios.com>
Change-Id: I744cc5cef69ff29f8d7ecc1cf01c9a629c6e222e

src/bin/lttng-sessiond/ust-metadata.cpp

index 6028527c5ed27cbdb4cd7a0c885b4944b211fb0d..7e6b1aba0810933f725a32b64986d8c29e9f1e82 100644 (file)
@@ -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) {
This page took 0.025377 seconds and 4 git commands to generate.