From 0a8f02139c47a7f77598eb992d2884a3f5763b9b Mon Sep 17 00:00:00 2001 From: =?utf8?q?J=C3=A9r=C3=A9mie=20Galarneau?= Date: Mon, 10 Nov 2014 17:35:26 -0500 Subject: [PATCH] Build fix: use ret directly in error handling path MIME-Version: 1.0 Content-Type: text/plain; charset=utf8 Content-Transfer-Encoding: 8bit Signed-off-by: Jérémie Galarneau --- src/bin/lttng/commands/enable_events.c | 11 ++++++----- 1 file changed, 6 insertions(+), 5 deletions(-) diff --git a/src/bin/lttng/commands/enable_events.c b/src/bin/lttng/commands/enable_events.c index cba349e63..11eebc022 100644 --- a/src/bin/lttng/commands/enable_events.c +++ b/src/bin/lttng/commands/enable_events.c @@ -637,7 +637,7 @@ static int enable_events(char *session_name) msg, print_channel_name(channel_name), session_name); - error = 1; + ret = CMD_ERROR; break; } default: @@ -720,7 +720,7 @@ static int enable_events(char *session_name) msg, print_channel_name(channel_name), session_name, opt_filter); - error = 1; + ret = CMD_ERROR; break; } default: @@ -898,6 +898,7 @@ static int enable_events(char *session_name) event_name, exclusion_string, print_channel_name(channel_name), session_name); + warn = 1; break; case LTTNG_ERR_TRACE_ALREADY_STARTED: { @@ -907,7 +908,7 @@ static int enable_events(char *session_name) msg, print_channel_name(channel_name), session_name); - error = 1; + ret = CMD_ERROR; break; } default: @@ -918,9 +919,9 @@ static int enable_events(char *session_name) ? print_raw_channel_name(channel_name) : print_channel_name(channel_name), session_name); + warn = 1; break; } - warn = 1; } else { MSG("%s event %s%s created in channel %s", get_domain_str(dom.type), event_name, @@ -954,7 +955,7 @@ static int enable_events(char *session_name) msg, print_channel_name(channel_name), session_name, opt_filter); - error = 1; + ret = CMD_ERROR; break; } default: -- 2.34.1