Fix: src.ctf.lttng-live: checking `errno` value on all errors
authorFrancis Deslauriers <francis.deslauriers@efficios.com>
Tue, 5 Nov 2019 19:25:15 +0000 (14:25 -0500)
committerJérémie Galarneau <jeremie.galarneau@efficios.com>
Fri, 15 Nov 2019 21:10:12 +0000 (16:10 -0500)
commit403657fd5ba02ee6a241f29c856e6846b9cf8503
tree6a544ae0db29d438bdba2b50a2bb7414ebf9cae0
parent92e57dbc7464b207d2e81d0844983c550524f10e
Fix: src.ctf.lttng-live: checking `errno` value on all errors

Issue
=====
We check the errno value even in cases where the errno is not set by the
function that witnessed the error.
For example, we have a `goto error;` after the
`lttng_live_get_one_metadata_packet() call.

Solution
========
Move the errno check right after the functions that set it on error.

Note
====
This erroneous change was introduced by this commit:
  commit c28512ab93b16501a8b0da494f0a03e5f0f22662
  Author: Francis Deslauriers <francis.deslauriers@efficios.com>
  Date:   Mon Oct 28 14:49:08 2019 -0400

      src.ctf.lttng-live: make `lttng_live_get_one_metadata_packet()` return status

Signed-off-by: Francis Deslauriers <francis.deslauriers@efficios.com>
Change-Id: I7acb86984249658460888079fd7968d35f6d43fa
Reviewed-on: https://review.lttng.org/c/babeltrace/+/2342
Tested-by: jenkins <jenkins@lttng.org>
Reviewed-by: Simon Marchi <simon.marchi@efficios.com>
src/plugins/ctf/lttng-live/metadata.c
This page took 0.024832 seconds and 4 git commands to generate.