Force usage of assert() condition when NDEBUG is defined
[lttng-tools.git] / src / common / sessiond-comm / inet6.c
index 66a4b552f25e659589435485b7bd88eb609d1e07..c9c9a5ae411e561099a682f310d74103368beb00 100644 (file)
@@ -1,22 +1,11 @@
 /*
- * Copyright (C) 2012 David Goulet <dgoulet@efficios.com>
+ * Copyright (C) 2012 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 <limits.h>
 #include <stdio.h>
 #include <stdlib.h>
 #include <sys/stat.h>
 #include <sys/types.h>
 #include <unistd.h>
-#include <errno.h>
 #include <fcntl.h>
 #include <common/compat/time.h>
 #include <poll.h>
 
 #include <common/common.h>
 #include <common/time.h>
+#include <common/compat/errno.h>
 
 #include "inet6.h"
 
@@ -360,7 +349,7 @@ ssize_t lttcomm_recvmsg_inet6_sock(struct lttcomm_sock *sock, void *buf,
                        }
                        iov[0].iov_base += ret;
                        iov[0].iov_len -= ret;
-                       assert(ret <= len_last);
+                       LTTNG_ASSERT(ret <= len_last);
                }
        } while ((ret > 0 && ret < len_last) || (ret < 0 && errno == EINTR));
        if (ret < 0) {
This page took 0.023838 seconds and 4 git commands to generate.