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>
Thu, 19 Sep 2019 19:31:48 +0000 (15:31 -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.026537 seconds and 4 git commands to generate.