From 6d1fcf1c029c10dd79c3be0686b1fae567604406 Mon Sep 17 00:00:00 2001 From: David Goulet Date: Thu, 2 Feb 2012 10:10:42 -0500 Subject: [PATCH] Fix missing strncmp return value comparison Remove CMD_ERROR forced value in lttng cli list command. Signed-off-by: David Goulet --- src/bin/lttng/commands/list.c | 2 -- src/bin/lttng/lttng.c | 2 +- 2 files changed, 1 insertion(+), 3 deletions(-) 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; } } -- 2.34.1