From: Jérémie Galarneau Date: Mon, 10 Nov 2014 22:35:26 +0000 (-0500) Subject: Build fix: use ret directly in error handling path X-Git-Tag: v2.4.3~38 X-Git-Url: https://git.lttng.org./?a=commitdiff_plain;h=0a8f02139c47a7f77598eb992d2884a3f5763b9b;p=lttng-tools.git Build fix: use ret directly in error handling path Signed-off-by: Jérémie Galarneau --- 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: