]> git.ipfire.org Git - thirdparty/dovecot/core.git/commitdiff
global: Fix overzealous use of ENUM_NEGATE
authorAki Tuomi <aki.tuomi@open-xchange.com>
Thu, 22 Oct 2020 15:53:34 +0000 (18:53 +0300)
committeraki.tuomi <aki.tuomi@open-xchange.com>
Fri, 23 Oct 2020 09:52:52 +0000 (09:52 +0000)
src/lib-index/mail-transaction-log-file.c
src/lib-ssl-iostream/iostream-openssl-context.c

index df07b4464202f0b7b806fc2f5255c1a9461dfa95..34f55faf8345c1cea222bdef3143c9effed5cc57 100644 (file)
@@ -48,7 +48,7 @@ mail_transaction_log_mark_corrupted(struct mail_transaction_log_file *file)
                        file->filepath, "fcntl(F_GETFL)");
                return;
        }
-       if (fcntl(file->fd, F_SETFL, flags & ENUM_NEGATE(O_APPEND)) < 0) {
+       if (fcntl(file->fd, F_SETFL, flags & ~O_APPEND) < 0) {
                mail_index_file_set_syscall_error(file->log->index,
                        file->filepath, "fcntl(F_SETFL)");
                return;
index 36478aa2e255128e2dc2cbaa06b18f86ed8e5931..fe9b05956e1307017853ec807f053f3a71790828 100644 (file)
@@ -619,7 +619,7 @@ ssl_iostream_context_init_common(struct ssl_iostream_context *ctx,
                                 const char **error_r)
 {
        unsigned long ssl_ops = SSL_OP_NO_SSLv2 |
-               (SSL_OP_ALL & ENUM_NEGATE(SSL_OP_DONT_INSERT_EMPTY_FRAGMENTS));
+               (SSL_OP_ALL & ~SSL_OP_DONT_INSERT_EMPTY_FRAGMENTS);
 
        ctx->pool = pool_alloconly_create("ssl iostream context", 4096);