From: David Goulet Date: Thu, 2 Feb 2012 15:10:42 +0000 (-0500) Subject: Fix missing strncmp return value comparison X-Git-Tag: v2.0-pre19~11 X-Git-Url: https://git.lttng.org/?p=lttng-tools.git;a=commitdiff_plain;h=6d1fcf1c029c10dd79c3be0686b1fae567604406;ds=sidebyside Fix missing strncmp return value comparison Remove CMD_ERROR forced value in lttng cli list command. Signed-off-by: David Goulet --- diff --git a/src/bin/lttng/commands/list.c b/src/bin/lttng/commands/list.c index c22206952..da287f5ca 100644 --- a/src/bin/lttng/commands/list.c +++ b/src/bin/lttng/commands/list.c @@ -602,7 +602,6 @@ int cmd_list(int argc, const char **argv) if (!opt_kernel && !opt_userspace) { ret = list_sessions(NULL); if (ret < 0) { - ret = CMD_ERROR; goto end; } } @@ -624,7 +623,6 @@ int cmd_list(int argc, const char **argv) /* List session attributes */ ret = list_sessions(session_name); if (ret < 0) { - ret = CMD_ERROR; goto end; } diff --git a/src/bin/lttng/lttng.c b/src/bin/lttng/lttng.c index 48658a42d..f84ba63d7 100644 --- a/src/bin/lttng/lttng.c +++ b/src/bin/lttng/lttng.c @@ -399,7 +399,7 @@ static int check_args_no_sessiond(int argc, char **argv) strncmp(argv[i], "--h", sizeof("--h")) == 0 || strncmp(argv[i], "--list-options", sizeof("--list-options")) == 0 || strncmp(argv[i], "--list-commands", sizeof("--list-commands")) == 0 || - strncmp(argv[i], "version", sizeof("version"))) { + strncmp(argv[i], "version", sizeof("version")) == 0) { return 1; } }