Cleanup: always use sysconf to get the page size
[lttng-tools.git] / src / bin / lttng / commands / metadata.c
index 663099dfd5c181f0827f44e1c6e1a338e2f5b9a1..35aea004e67aecb05b5c44c54630468b82c551ce 100644 (file)
@@ -1,22 +1,11 @@
 /*
- * Copyright (C) 2015 Julien Desfossez <jdesfossez@efficios.com>
+ * Copyright (C) 2015 Julien Desfossez <jdesfossez@efficios.com>
  *
- * This program is free software; you can redistribute it and/or modify
- * it under the terms of the GNU General Public License, version 2 only,
- * as published by the Free Software Foundation.
+ * SPDX-License-Identifier: GPL-2.0-only
  *
- * This program is distributed in the hope that it will be useful,
- * but WITHOUT ANY WARRANTY; without even the implied warranty of
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
- * GNU General Public License for more details.
- *
- * You should have received a copy of the GNU General Public License along
- * with this program; if not, write to the Free Software Foundation, Inc.,
- * 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA.
  */
 
 #define _LGPL_SOURCE
-#include <assert.h>
 #include <ctype.h>
 #include <popt.h>
 #include <stdio.h>
@@ -68,7 +57,7 @@ static int count_arguments(const char **argv)
 {
        int i = 0;
 
-       assert(argv);
+       LTTNG_ASSERT(argv);
 
        while (argv[i] != NULL) {
                i++;
@@ -108,6 +97,7 @@ static int handle_command(const char **argv)
        }
 
        argc = count_arguments(argv);
+       LTTNG_ASSERT(argc >= 1);
 
        cmd = &actions[i];
        while (cmd->func != NULL) {
This page took 0.025075 seconds and 4 git commands to generate.