]> git.ipfire.org Git - thirdparty/dovecot/core.git/commitdiff
lib-imap: Replace compile time defined conditions with conditional compilation.
authorsergey.kitov <sergey.kitov@open-xchange.com>
Thu, 30 Dec 2021 14:59:47 +0000 (16:59 +0200)
committeraki.tuomi <aki.tuomi@open-xchange.com>
Wed, 19 Jan 2022 11:06:38 +0000 (11:06 +0000)
src/lib-imap/imap-date.c

index 2e5569a5104c849da3d98060bec3bdfa817cf7d5..2f04cabcce70097938fba75461e235e686eafad8 100644 (file)
@@ -91,7 +91,11 @@ static bool imap_mktime(struct tm *tm, time_t *time_r)
        if (tm->tm_year <= 100) {
                /* too old. time_t can be signed or unsigned, handle
                   both cases. */
-               *time_r = (time_t)-1 < (int)0 ? INT_MIN : 0;
+#ifdef TIME_T_SIGNED
+               *time_r = INT_MIN;
+#else
+               *time_r = 0;
+#endif
        } else {
                /* too high. return the highest allowed value.
                   we shouldn't get here with 64bit time_t,