Force usage of assert() condition when NDEBUG is defined
[lttng-tools.git] / src / common / sessiond-comm / inet.c
index d107ced2881f787166c99302f63326dfe6f4499a..15608fd94c194157b72f6076c10e54bb9fbb65ed 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 "inet.h"
 
@@ -381,7 +370,7 @@ ssize_t lttcomm_recvmsg_inet_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));
 
This page took 0.023854 seconds and 4 git commands to generate.