Cleanup: always use sysconf to get the page size
[lttng-tools.git] / src / bin / lttng / commands / snapshot.c
index 22531e8f223070914cad1f37ad8bcbabc51fbae1..c37e09a7dbed02eb1c192481c0955544808e4d7b 100644 (file)
@@ -6,7 +6,6 @@
  */
 
 #define _LGPL_SOURCE
-#include <assert.h>
 #include <inttypes.h>
 #include <popt.h>
 #include <stdio.h>
@@ -15,7 +14,6 @@
 #include <sys/stat.h>
 #include <sys/types.h>
 #include <unistd.h>
-#include <assert.h>
 
 #include <common/utils.h>
 #include <common/mi-lttng.h>
@@ -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 *opt = poptGetOptArg(pc);
+                       const char *max_size_arg = poptGetOptArg(pc);
 
-                       if (utils_parse_size_suffix((char *) opt, &val) < 0) {
-                               ERR("Unable to handle max-size value %s", opt);
+                       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;
                        }
This page took 0.024447 seconds and 4 git commands to generate.