From db526a2a91cf521af47030f0bd42386554a0f253 Mon Sep 17 00:00:00 2001 From: =?utf8?q?J=C3=A9r=C3=A9mie=20Galarneau?= Date: Wed, 26 Nov 2014 16:20:21 -0500 Subject: [PATCH] Fix: Unreachable error logging in set_option() MIME-Version: 1.0 Content-Type: text/plain; charset=utf8 Content-Transfer-Encoding: 8bit *** CID 1256136: Logically dead code (DEADCODE) Signed-off-by: Jérémie Galarneau --- src/bin/lttng-sessiond/main.c | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/src/bin/lttng-sessiond/main.c b/src/bin/lttng-sessiond/main.c index e69ae0d45..ac1435b3e 100644 --- a/src/bin/lttng-sessiond/main.c +++ b/src/bin/lttng-sessiond/main.c @@ -4458,6 +4458,7 @@ static int set_option(int opt, const char *arg, const char *optname) ret = -1; } +end: if (ret == -EINVAL) { const char *opt_name = "unknown"; int i; @@ -4473,7 +4474,7 @@ static int set_option(int opt, const char *arg, const char *optname) WARN("Invalid argument provided for option \"%s\", using default value.", opt_name); } -end: + return ret; } -- 2.34.1