From: Jérémie Galarneau Date: Wed, 26 Nov 2014 21:20:21 +0000 (-0500) Subject: Fix: Unreachable error logging in set_option() X-Git-Tag: v2.5.3~8 X-Git-Url: http://git.liburcu.org/?p=lttng-tools.git;a=commitdiff_plain;h=9f7cee5682a4d65d4043854a3ab1a3330ac1022f Fix: Unreachable error logging in set_option() *** CID 1256136: Logically dead code (DEADCODE) Signed-off-by: Jérémie Galarneau --- diff --git a/src/bin/lttng-sessiond/main.c b/src/bin/lttng-sessiond/main.c index a3e08ec51..abe556c0d 100644 --- a/src/bin/lttng-sessiond/main.c +++ b/src/bin/lttng-sessiond/main.c @@ -4425,6 +4425,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; @@ -4440,7 +4441,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; }