X-Git-Url: https://git.lttng.org/?a=blobdiff_plain;f=src%2Fbin%2Flttng%2Fcommands%2Fsnapshot.c;h=c37e09a7dbed02eb1c192481c0955544808e4d7b;hb=81663f073dbfb4b61c06a0ceb8ca33c4fc41b1c5;hp=8f44b9f1c189aeb893e3f8baf3883177fb880629;hpb=38250272a0ab47aad1b93b15641df77abd658c81;p=lttng-tools.git diff --git a/src/bin/lttng/commands/snapshot.c b/src/bin/lttng/commands/snapshot.c index 8f44b9f1c..c37e09a7d 100644 --- a/src/bin/lttng/commands/snapshot.c +++ b/src/bin/lttng/commands/snapshot.c @@ -6,7 +6,6 @@ */ #define _LGPL_SOURCE -#include #include #include #include @@ -15,7 +14,6 @@ #include #include #include -#include #include #include @@ -81,7 +79,7 @@ static int count_arguments(const char **argv) { int i = 0; - assert(argv); + LTTNG_ASSERT(argv); while (argv[i] != NULL) { i++; @@ -473,7 +471,7 @@ static enum cmd_error_code handle_command(const char **argv) argc = count_arguments(argv); /* popt should have passed NULL if no arguments are present. */ - assert(argc > 0); + LTTNG_ASSERT(argc > 0); cmd = &actions[i]; while (cmd->func != NULL) { @@ -624,10 +622,11 @@ int cmd_snapshot(int argc, const char **argv) case OPT_MAX_SIZE: { uint64_t val; - const char *optarg = poptGetOptArg(pc); + const char *max_size_arg = poptGetOptArg(pc); - if (utils_parse_size_suffix((char *) optarg, &val) < 0) { - ERR("Unable to handle max-size value %s", optarg); + if (utils_parse_size_suffix((char *) max_size_arg, &val) < 0) { + ERR("Unable to handle max-size value %s", + max_size_arg); cmd_ret = CMD_ERROR; goto end; }