Mercurial > dovecot > core-2.2
changeset 22161:f9c89c5172a5
-Wstrict-bool warning fixes
author | Timo Sirainen <timo.sirainen@dovecot.fi> |
---|---|
date | Tue, 07 Jun 2016 03:41:18 +0300 |
parents | 79a84a2282ef |
children | 91d558a9718f |
files | src/lib-fs/fs-randomfail.c src/lib-mail/message-address.c src/lib/ioloop-epoll.c src/lib/ioloop-poll.c |
diffstat | 4 files changed, 13 insertions(+), 13 deletions(-) [+] |
line wrap: on
line diff
--- a/src/lib-fs/fs-randomfail.c Mon Jun 06 17:10:12 2016 +0300 +++ b/src/lib-fs/fs-randomfail.c Tue Jun 07 03:41:18 2016 +0300 @@ -261,7 +261,7 @@ { if (ret == 0 || errno != EAGAIN) { if (fs_random_fail(file->file.fs, 2, op)) - return TRUE; + return -1; file->op_pending[op] = FALSE; } return ret;
--- a/src/lib-mail/message-address.c Mon Jun 06 17:10:12 2016 +0300 +++ b/src/lib-mail/message-address.c Tue Jun 07 03:41:18 2016 +0300 @@ -458,7 +458,7 @@ if (addr->name != NULL) { /* check for MIME encoded-word */ - if (strstr(addr->name, "=?")) + if (strstr(addr->name, "=?") != NULL) /* MIME encoded-word MUST NOT appear within a 'quoted-string' so escaping and quoting of phrase is not possible, instead use obsolete RFC822 phrase syntax which allow spaces */
--- a/src/lib/ioloop-epoll.c Mon Jun 06 17:10:12 2016 +0300 +++ b/src/lib/ioloop-epoll.c Tue Jun 07 03:41:18 2016 +0300 @@ -72,11 +72,11 @@ if (io == NULL) continue; - if (io->io.condition & IO_READ) + if ((io->io.condition & IO_READ) != 0) events |= IO_EPOLL_INPUT; - if (io->io.condition & IO_WRITE) + if ((io->io.condition & IO_WRITE) != 0) events |= IO_EPOLL_OUTPUT; - if (io->io.condition & IO_ERROR) + if ((io->io.condition & IO_ERROR) != 0) events |= IO_EPOLL_ERROR; }
--- a/src/lib/ioloop-poll.c Mon Jun 06 17:10:12 2016 +0300 +++ b/src/lib/ioloop-poll.c Tue Jun 07 03:41:18 2016 +0300 @@ -85,11 +85,11 @@ } old_events = ctx->fds[index].events; - if (condition & IO_READ) + if ((condition & IO_READ) != 0) ctx->fds[index].events |= IO_POLL_INPUT; - if (condition & IO_WRITE) + if ((condition & IO_WRITE) != 0) ctx->fds[index].events |= IO_POLL_OUTPUT; - if (condition & IO_ERROR) + if ((condition & IO_ERROR) != 0) ctx->fds[index].events |= IO_POLL_ERROR; i_assert(ctx->fds[index].events != old_events); } @@ -120,11 +120,11 @@ #endif i_free(io); - if (condition & IO_READ) { + if ((condition & IO_READ) != 0) { ctx->fds[index].events &= ~(POLLIN|POLLPRI); ctx->fds[index].revents &= ~(POLLIN|POLLPRI); } - if (condition & IO_WRITE) { + if ((condition & IO_WRITE) != 0) { ctx->fds[index].events &= ~POLLOUT; ctx->fds[index].revents &= ~POLLOUT; } @@ -189,13 +189,13 @@ (IO_READ|IO_WRITE)) == (IO_READ|IO_WRITE)) { call = TRUE; pollfd->revents = 0; - } else if (io->io.condition & IO_READ) { + } else if ((io->io.condition & IO_READ) != 0) { call = (pollfd->revents & IO_POLL_INPUT) != 0; pollfd->revents &= ~IO_POLL_INPUT; - } else if (io->io.condition & IO_WRITE) { + } else if ((io->io.condition & IO_WRITE) != 0) { call = (pollfd->revents & IO_POLL_OUTPUT) != 0; pollfd->revents &= ~IO_POLL_OUTPUT; - } else if (io->io.condition & IO_ERROR) { + } else if ((io->io.condition & IO_ERROR) != 0) { call = (pollfd->revents & IO_POLL_ERROR) != 0; pollfd->revents &= ~IO_POLL_ERROR; } else {