Clean-up: lttng: silence warning in regenerate command handler
authorJérémie Galarneau <jeremie.galarneau@efficios.com>
Tue, 10 Sep 2019 23:47:28 +0000 (19:47 -0400)
committerJérémie Galarneau <jeremie.galarneau@efficios.com>
Tue, 10 Sep 2019 23:47:28 +0000 (19:47 -0400)
argv[0] is used before checking argc, resulting in a warning
that argv could be of zero-length.

This is not a reachable bug; it really is a false positive.

Signed-off-by: Jérémie Galarneau <jeremie.galarneau@efficios.com>
src/bin/lttng/commands/regenerate.c

index c53df249285dcd7b5f7010baff0fc35f3e604ce5..cba04ac77f9fce8e13a4061d3cc6041cfe968e5e 100644 (file)
@@ -127,6 +127,7 @@ static int handle_command(const char **argv)
        }
 
        argc = count_arguments(argv);
+       assert(argc >= 1);
 
        cmd = &actions[i];
        while (cmd->func != NULL) {
This page took 0.026491 seconds and 5 git commands to generate.