]> git.ipfire.org Git - thirdparty/dovecot/core.git/commitdiff
auth: Avoid comparison of ints of different signs on FreeBSD
authorJosef 'Jeff' Sipek <jeff.sipek@dovecot.fi>
Fri, 11 May 2018 14:38:32 +0000 (10:38 -0400)
committerAki Tuomi <aki.tuomi@dovecot.fi>
Tue, 7 Aug 2018 10:32:05 +0000 (13:32 +0300)
For legacy reasons, rlim_t on FreeBSD is defined as int64_t.

src/auth/passdb-cache.c

index dc52350c0373c30f6ff8a20e6abc25ef823d7a70..782dfcf740a67a233720c65626d8f7d996249cfb 100644 (file)
@@ -186,7 +186,7 @@ void passdb_cache_init(const struct auth_settings *set)
                return;
 
        if (restrict_get_process_size(&limit) == 0 &&
-           set->cache_size > limit) {
+           set->cache_size > (uoff_t)limit) {
                i_warning("auth_cache_size (%"PRIuUOFF_T"M) is higher than "
                          "process VSZ limit (%luM)",
                          set->cache_size/1024/1024,