The error paths touched by this patch currently don't set the `ret`
variable, resulting in the error not being communicated to the caller.
Fix that.
Change-Id: If044e4ff28a98bda408610c1c2f85d7fe13ea1c1
Signed-off-by: Simon Marchi <simon.marchi@efficios.com>
Reviewed-on: https://review.lttng.org/c/babeltrace/+/5691
Tested-by: jenkins <jenkins@lttng.org>
Reviewed-by: Philippe Proulx <eeppeliteloop@gmail.com>
_BT_COMP_LOGE_NODE(node,
"Stream class has a `id` attribute, "
"but trace has no packet header field class.");
_BT_COMP_LOGE_NODE(node,
"Stream class has a `id` attribute, "
"but trace has no packet header field class.");
_BT_COMP_LOGE_NODE(node,
"Stream class has a `id` attribute, "
"but trace's packet header field class has no `stream_id` field.");
_BT_COMP_LOGE_NODE(node,
"Stream class has a `id` attribute, "
"but trace's packet header field class has no `stream_id` field.");
_BT_COMP_LOGE_NODE(node,
"Stream class has a `id` attribute, "
"but trace's packet header field class's `stream_id` field is not an integer field class.");
_BT_COMP_LOGE_NODE(node,
"Stream class has a `id` attribute, "
"but trace's packet header field class's `stream_id` field is not an integer field class.");
if (val != 1) {
_BT_COMP_LOGE_NODE(node,
"Invalid trace's `minor` attribute: expecting 1.");
if (val != 1) {
_BT_COMP_LOGE_NODE(node,
"Invalid trace's `minor` attribute: expecting 1.");
if (val != 8) {
_BT_COMP_LOGE_NODE(node,
"Invalid trace's `minor` attribute: expecting 8.");
if (val != 8) {
_BT_COMP_LOGE_NODE(node,
"Invalid trace's `minor` attribute: expecting 8.");