Fix: lttng-disable-event: erroneous error code used in logging
authorJérémie Galarneau <jeremie.galarneau@efficios.com>
Fri, 3 Feb 2023 19:31:39 +0000 (14:31 -0500)
committerJérémie Galarneau <jeremie.galarneau@efficios.com>
Mon, 6 Feb 2023 16:30:54 +0000 (11:30 -0500)
commited0c6be4278ed647f5f7d682169557b72776484e
tree6d150d6f974654a65ea16a04f84e8ecb4f129f28
parent094a7160e3aa820ad16516ce5247f268be491e41
Fix: lttng-disable-event: erroneous error code used in logging

66cefebdc introduced `disable_ret` to hold the integral result of
lttng_disable_event_ext() instead of mixing enums and integers.

In doing so, one use site was left unmodified which resulted in the
wrong variable being used to log an error when the command failed.

This was spotted by clang:
  commands/disable_events.cpp:252:21: warning: result of comparison of
  constant -83 with expression of type 'enum   cmd_error_code' is always false [-Wtautological-constant-out-of-range-compare]
                                      command_ret == -LTTNG_ERR_NEED_CHANNEL_NAME ?

Signed-off-by: Jérémie Galarneau <jeremie.galarneau@efficios.com>
Change-Id: I282ebee0140f7044847aab6c43ba6bd0c185fc46
src/bin/lttng/commands/disable_events.cpp
This page took 0.025588 seconds and 4 git commands to generate.