Force usage of assert() condition when NDEBUG is defined
[lttng-tools.git] / src / bin / lttng-consumerd / health-consumerd.c
index 15b71a1abc7cc68214972e56a0eb923e31098d78..90b4b1e12439eb9dcc34a265c20c37a3608668ce 100644 (file)
@@ -1,18 +1,8 @@
 /*
- * Copyright (C) 2013 Mathieu Desnoyers <mathieu.desnoyers@efficios.com>
+ * Copyright (C) 2013 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
@@ -35,7 +25,6 @@
 #include <poll.h>
 #include <unistd.h>
 #include <sys/mman.h>
-#include <assert.h>
 #include <urcu/compiler.h>
 #include <ulimit.h>
 #include <inttypes.h>
@@ -266,11 +255,6 @@ restart:
                        revents = LTTNG_POLL_GETEV(&events, i);
                        pollfd = LTTNG_POLL_GETFD(&events, i);
 
-                       if (!revents) {
-                               /* No activity for this FD (poll implementation). */
-                               continue;
-                       }
-
                        /* Thread quit pipe has been closed. Killing thread. */
                        ret = check_health_quit_pipe(pollfd, revents);
                        if (ret) {
@@ -313,7 +297,7 @@ restart:
 
                rcu_thread_online();
 
-               assert(msg.cmd == HEALTH_CMD_CHECK);
+               LTTNG_ASSERT(msg.cmd == HEALTH_CMD_CHECK);
 
                memset(&reply, 0, sizeof(reply));
                for (i = 0; i < NR_HEALTH_CONSUMERD_TYPES; i++) {
This page took 0.024081 seconds and 4 git commands to generate.