Force usage of assert() condition when NDEBUG is defined
[lttng-tools.git] / src / bin / lttng-relayd / utils.c
index 7ae0879e598674007cdee164cee4d2ff2c263c70..599f7ff819f3cf4855ca9f7b47ae27d6343c0493 100644 (file)
@@ -1,23 +1,12 @@
 /*
- * Copyright (C) 2013 Julien Desfossez <jdesfossez@efficios.com>
- *                      David Goulet <dgoulet@efficios.com>
+ * Copyright (C) 2013 Julien Desfossez <jdesfossez@efficios.com>
+ * Copyright (C) 2013 David Goulet <dgoulet@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 <stdio.h>
 #include <stdlib.h>
 #include <string.h>
@@ -33,7 +22,7 @@ static char *create_output_path_auto(const char *path_name)
 {
        int ret;
        char *traces_path = NULL;
-       char *default_path;
+       const char *default_path;
 
        default_path = utils_get_home_dir();
        if (default_path == NULL) {
@@ -79,7 +68,7 @@ exit:
  */
 char *create_output_path(const char *path_name)
 {
-       assert(path_name);
+       LTTNG_ASSERT(path_name);
 
        if (opt_output_path == NULL) {
                return create_output_path_auto(path_name);
This page took 0.02498 seconds and 4 git commands to generate.