]> git.ipfire.org Git - thirdparty/dovecot/core.git/commitdiff
lib: Fix building with --disable-asserts
authorTimo Sirainen <timo.sirainen@open-xchange.com>
Tue, 2 Nov 2021 14:06:55 +0000 (16:06 +0200)
committeraki.tuomi <aki.tuomi@open-xchange.com>
Mon, 8 Nov 2021 08:51:57 +0000 (08:51 +0000)
The #endif location was wrong.

src/lib/macros.h

index 7208d23f572a262002535ea00d6155518132d12c..bfe32e4b47838c4a2643bdfb3db01350fb126e91 100644 (file)
 #ifdef DISABLE_ASSERTS
 #  define i_assert(expr)
 #else
-
-#define i_assert(expr)                 STMT_START{                     \
+#  define i_assert(expr)                       STMT_START{                     \
      if (unlikely(!(expr)))                                            \
        i_panic("file %s: line %d (%s): assertion failed: (%s)",                \
                __FILE__,                                               \
                __LINE__,                                               \
                __func__,                                       \
                #expr);                 }STMT_END
+#endif
 
 /* Convenience macros to test the versions of dovecot. */
 #if defined DOVECOT_VERSION_MAJOR && defined DOVECOT_VERSION_MINOR
         (st_a).st_size != (st_b).st_size || \
         (st_a).st_ino != (st_b).st_ino)
 
-#endif
-
 #ifdef HAVE_UNDEFINED_SANITIZER
 # define ATTR_NO_SANITIZE(x) __attribute__((no_sanitize((x))))
 #else