Fix missing strncmp return value comparison
authorDavid Goulet <dgoulet@efficios.com>
Thu, 2 Feb 2012 15:10:42 +0000 (10:10 -0500)
committerDavid Goulet <dgoulet@efficios.com>
Thu, 2 Feb 2012 15:10:50 +0000 (10:10 -0500)
Remove CMD_ERROR forced value in lttng cli list command.

Signed-off-by: David Goulet <dgoulet@efficios.com>
src/bin/lttng/commands/list.c
src/bin/lttng/lttng.c

index c22206952160c7bc6e477d4250feed230ed99000..da287f5caf9c4a7658b30f4419cf1be7aebb66bb 100644 (file)
@@ -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;
                }
 
index 48658a42ddfb9d9e5f2a7ddd820f258bcd0914ac..f84ba63d7e8de48e4a9b6f44c79bbeffa72a7a89 100644 (file)
@@ -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;
                }
        }
This page took 0.027306 seconds and 4 git commands to generate.