]> git.ipfire.org Git - thirdparty/dovecot/core.git/commitdiff
lib: DOVECOT_PREREQ() - Remove surrounding if checks
authorTimo Sirainen <timo.sirainen@open-xchange.com>
Tue, 14 Sep 2021 16:23:41 +0000 (18:23 +0200)
committeraki.tuomi <aki.tuomi@open-xchange.com>
Mon, 8 Nov 2021 08:51:57 +0000 (08:51 +0000)
The DOVECOT_VERSION_* macros are expected to always exist.

src/lib/macros.h

index bfe32e4b47838c4a2643bdfb3db01350fb126e91..dea1ac7270330a0b2bfa3708279fe21d83bc1533 100644 (file)
                #expr);                 }STMT_END
 #endif
 
-/* Convenience macros to test the versions of dovecot. */
-#if defined DOVECOT_VERSION_MAJOR && defined DOVECOT_VERSION_MINOR
-#  define DOVECOT_PREREQ(maj, min) \
-          ((DOVECOT_VERSION_MAJOR << 16) + DOVECOT_VERSION_MINOR >= ((maj) << 16) + (min))
-#else
-#  define DOVECOT_PREREQ(maj, min) 0
-#endif
+/* Convenience macro to test the versions of dovecot. */
+#define DOVECOT_PREREQ(maj, min) \
+       ((DOVECOT_VERSION_MAJOR << 16) + DOVECOT_VERSION_MINOR >= ((maj) << 16) + (min))
 
 #ifdef __cplusplus
 #  undef STATIC_ARRAY