Force usage of assert() condition when NDEBUG is defined
[lttng-tools.git] / tests / utils / utils.c
index d54c6cc99e668965d23349dc40ec11194cf41023..fee74e961245d02e0322f70c86c9e7d21e33cd43 100644 (file)
@@ -5,7 +5,6 @@
  *
  */
 
-#include <assert.h>
 #include <common/compat/time.h>
 #include <common/time.h>
 #include <fcntl.h>
@@ -19,6 +18,7 @@
 #include <unistd.h>
 
 #include <common/compat/errno.h>
+#include <common/macros.h>
 
 #include "utils.h"
 
@@ -27,7 +27,7 @@ int64_t elapsed_time_ns(struct timespec *t1, struct timespec *t2)
 {
        struct timespec delta;
 
-       assert(t1 && t2);
+       LTTNG_ASSERT(t1 && t2);
        delta.tv_sec = t2->tv_sec - t1->tv_sec;
        delta.tv_nsec = t2->tv_nsec - t1->tv_nsec;
        return ((int64_t) NSEC_PER_SEC * (int64_t) delta.tv_sec) +
This page took 0.023913 seconds and 4 git commands to generate.