bin: compile lttng-relayd as a C++
[lttng-tools.git] / src / common / index / index.c
index e68a79df54ee4a60ed529c8be9aa19bc279df0de..f6b8e0716d9c6cc8308aadaab59c1a9e3df46bb3 100644 (file)
@@ -1,24 +1,13 @@
 /*
- * Copyright (C) 2013 Julien Desfossez <jdesfossez@efficios.com>
- *                      David Goulet <dgoulet@efficios.com>
- *               2016 - Mathieu Desnoyers <mathieu.desnoyers@efficios.com>
+ * Copyright (C) 2013 Julien Desfossez <jdesfossez@efficios.com>
+ * Copyright (C) 2013 David Goulet <dgoulet@efficios.com>
+ * Copyright (C) 2016 Mathieu Desnoyers <mathieu.desnoyers@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 <sys/stat.h>
 #include <sys/types.h>
 #include <fcntl.h>
@@ -54,7 +43,7 @@ static enum lttng_trace_chunk_status _lttng_index_file_create_from_trace_chunk(
        const bool acquired_reference = lttng_trace_chunk_get(chunk);
        const char *separator;
 
-       assert(acquired_reference);
+       LTTNG_ASSERT(acquired_reference);
 
        index_file = zmalloc(sizeof(*index_file));
        if (!index_file) {
@@ -210,8 +199,8 @@ int lttng_index_file_write(const struct lttng_index_file *index_file,
        ssize_t ret;
        const size_t len = index_file->element_len;;
 
-       assert(index_file);
-       assert(element);
+       LTTNG_ASSERT(index_file);
+       LTTNG_ASSERT(element);
 
        if (!index_file->file) {
                goto error;
@@ -239,7 +228,7 @@ int lttng_index_file_read(const struct lttng_index_file *index_file,
        ssize_t ret;
        const size_t len = index_file->element_len;
 
-       assert(element);
+       LTTNG_ASSERT(element);
 
        if (!index_file->file) {
                goto error;
This page took 0.024196 seconds and 4 git commands to generate.