]> git.ipfire.org Git - thirdparty/dovecot/core.git/commitdiff
Compiling fix for Sun compilers.
authorTimo Sirainen <tss@iki.fi>
Fri, 19 Apr 2013 11:29:23 +0000 (14:29 +0300)
committerTimo Sirainen <tss@iki.fi>
Fri, 19 Apr 2013 11:29:23 +0000 (14:29 +0300)
I wish gcc/clang warned about these as well, as sometimes they indicate bugs.

src/imap-urlauth/imap-urlauth-worker.c
src/lib/ioloop.c

index ad02c81c1366b74fd4b436d98c33b40582de6eec..6d94a8fdceed80606399c092547512fc1c6f9d52 100644 (file)
@@ -941,7 +941,7 @@ static void main_stdio_run(const char *access_user,
 {
        bool debug;
 
-       debug = getenv("DEBUG");
+       debug = getenv("DEBUG") != NULL;
        access_user = access_user != NULL ? access_user : getenv("USER");
        if (access_user == NULL && IS_STANDALONE())
                access_user = getlogin();
index b89adcf96d90f20528bba3d8a4492997cbf37c2a..179507cc7221cba5b57dbee4ae735b54fabfd8dd 100644 (file)
@@ -663,7 +663,7 @@ struct timeout *io_loop_move_timeout(struct timeout **_timeout)
 
 bool io_loop_have_ios(struct ioloop *ioloop)
 {
-       return ioloop->io_files;
+       return ioloop->io_files != NULL;
 }
 
 bool io_loop_have_immediate_timeouts(struct ioloop *ioloop)