]> git.ipfire.org Git - thirdparty/dovecot/core.git/commitdiff
global: unsigned int:1 -> bool:1
authorTimo Sirainen <timo.sirainen@dovecot.fi>
Sun, 5 Jun 2016 11:37:11 +0000 (14:37 +0300)
committerTimo Sirainen <timo.sirainen@dovecot.fi>
Mon, 6 Jun 2016 12:37:02 +0000 (15:37 +0300)
perl -i -pe 's/unsigned int ([^,:;]+):1;/bool $1:1;/' **/*.[ch]

248 files changed:
src/anvil/anvil-connection.c
src/anvil/penalty.c
src/auth/auth-client-connection.h
src/auth/auth-master-connection.h
src/auth/auth-penalty.c
src/auth/auth-postfix-connection.c
src/auth/auth-request-handler.c
src/auth/auth-request.h
src/auth/auth-worker-client.c
src/auth/auth-worker-server.c
src/auth/db-checkpassword.c
src/auth/db-passwd-file.h
src/auth/db-sql.h
src/auth/mech-digest-md5.c
src/auth/passdb-pam.c
src/auth/userdb-passwd.c
src/auth/userdb-sql.c
src/auth/userdb-static.c
src/config/config-connection.c
src/config/config-parser-private.h
src/config/doveconf.c
src/dict/dict-connection.h
src/director/director-connection.c
src/director/director-host.h
src/director/director.h
src/director/doveadm-connection.c
src/director/login-connection.c
src/director/mail-host.h
src/director/user-directory.h
src/doveadm/client-connection.h
src/doveadm/doveadm-dsync.c
src/doveadm/doveadm-mail-index.c
src/doveadm/doveadm-mail-mailbox-status.c
src/doveadm/doveadm-mail.h
src/doveadm/doveadm-print-flow.c
src/doveadm/doveadm-print-pager.c
src/doveadm/doveadm-print-tab.c
src/doveadm/doveadm-print-table.c
src/doveadm/doveadm-stats.c
src/doveadm/dsync/dsync-brain-private.h
src/doveadm/dsync/dsync-ibc-private.h
src/doveadm/dsync/dsync-ibc-stream.c
src/doveadm/dsync/dsync-mailbox-export.c
src/doveadm/dsync/dsync-mailbox-import.c
src/doveadm/dsync/dsync-mailbox-tree.h
src/doveadm/server-connection.c
src/imap-login/imap-login-client.h
src/imap-urlauth/imap-urlauth-client.h
src/imap-urlauth/imap-urlauth-login.c
src/imap-urlauth/imap-urlauth-worker.c
src/imap/cmd-append.c
src/imap/cmd-idle.c
src/imap/cmd-list.c
src/imap/cmd-select.c
src/imap/cmd-urlfetch.c
src/imap/imap-client.h
src/imap/imap-fetch-body.c
src/imap/imap-fetch.h
src/imap/imap-notify.h
src/imap/imap-search.h
src/imap/imap-sync.c
src/indexer/indexer-client.c
src/indexer/indexer-queue.h
src/indexer/master-connection.c
src/indexer/worker-connection.c
src/ipc/ipc-connection.h
src/lib-auth/auth-client-private.h
src/lib-auth/auth-master.c
src/lib-auth/auth-master.h
src/lib-auth/auth-server-connection.h
src/lib-compression/istream-bzlib.c
src/lib-compression/istream-lz4.c
src/lib-compression/istream-lzma.c
src/lib-compression/istream-zlib.c
src/lib-compression/ostream-bzlib.c
src/lib-compression/ostream-lzma.c
src/lib-compression/ostream-zlib.c
src/lib-dict/dict-client.c
src/lib-dict/dict-private.h
src/lib-dict/dict-sql.c
src/lib-fs/fs-api-private.h
src/lib-http/http-client-private.h
src/lib-http/http-header-parser.c
src/lib-http/http-message-parser.h
src/lib-http/http-request-parser.c
src/lib-http/http-request.h
src/lib-http/http-response.h
src/lib-http/http-server-private.h
src/lib-http/http-transfer-chunked.c
src/lib-http/http-url.c
src/lib-http/http-url.h
src/lib-imap-client/imapc-connection.c
src/lib-imap-storage/imap-metadata.c
src/lib-imap-storage/imap-msgpart-url.c
src/lib-imap-storage/imap-msgpart.c
src/lib-imap-urlauth/imap-urlauth-connection.c
src/lib-imap-urlauth/imap-urlauth-fetch.c
src/lib-imap-urlauth/imap-urlauth-fetch.h
src/lib-imap-urlauth/imap-urlauth-private.h
src/lib-imap/imap-arg.h
src/lib-imap/imap-parser.c
src/lib-imap/imap-url.c
src/lib-imap/imap-url.h
src/lib-index/mail-cache-private.h
src/lib-index/mail-cache-transaction.c
src/lib-index/mail-index-private.h
src/lib-index/mail-index-strmap.c
src/lib-index/mail-index-sync-private.h
src/lib-index/mail-index-sync.c
src/lib-index/mail-index-transaction-private.h
src/lib-index/mail-index-view-private.h
src/lib-index/mail-index-view-sync.c
src/lib-index/mail-index.h
src/lib-index/mail-transaction-log-private.h
src/lib-index/mail-transaction-log-view-private.h
src/lib-index/mail-transaction-log.h
src/lib-lda/duplicate.c
src/lib-lda/lmtp-client.c
src/lib-mail/istream-binary-converter.c
src/lib-mail/istream-dot.c
src/lib-mail/istream-header-filter.c
src/lib-mail/message-decoder.c
src/lib-mail/message-header-decode.c
src/lib-mail/message-header-parser.c
src/lib-mail/message-header-parser.h
src/lib-mail/message-parser.c
src/lib-mail/message-search.c
src/lib-master/ipc-server.c
src/lib-master/master-instance.c
src/lib-master/master-login-auth.c
src/lib-master/master-login.c
src/lib-master/master-login.h
src/lib-master/master-service-private.h
src/lib-master/master-service-settings-cache.c
src/lib-master/master-service-settings.h
src/lib-master/master-service.h
src/lib-master/service-settings.h
src/lib-sql/driver-cassandra.c
src/lib-sql/driver-mysql.c
src/lib-sql/driver-pgsql.c
src/lib-sql/driver-sqlite.c
src/lib-sql/sql-api-private.h
src/lib-ssl-iostream/iostream-openssl.h
src/lib-storage/index/cydir/cydir-save.c
src/lib-storage/index/dbox-common/dbox-file.h
src/lib-storage/index/dbox-common/dbox-save.h
src/lib-storage/index/dbox-multi/mdbox-map-private.h
src/lib-storage/index/dbox-multi/mdbox-map.c
src/lib-storage/index/dbox-multi/mdbox-storage-rebuild.c
src/lib-storage/index/dbox-multi/mdbox-storage.h
src/lib-storage/index/imapc/imapc-list.h
src/lib-storage/index/imapc/imapc-save.c
src/lib-storage/index/imapc/imapc-storage.h
src/lib-storage/index/imapc/imapc-sync.h
src/lib-storage/index/index-mail.h
src/lib-storage/index/index-rebuild.h
src/lib-storage/index/index-search-private.h
src/lib-storage/index/index-search.c
src/lib-storage/index/index-sort-string.c
src/lib-storage/index/index-thread-finish.c
src/lib-storage/index/index-thread-private.h
src/lib-storage/index/index-thread.c
src/lib-storage/index/istream-mail.c
src/lib-storage/index/maildir/maildir-copy.c
src/lib-storage/index/maildir/maildir-keywords.c
src/lib-storage/index/maildir/maildir-save.c
src/lib-storage/index/maildir/maildir-storage.h
src/lib-storage/index/maildir/maildir-sync.c
src/lib-storage/index/maildir/maildir-uidlist.c
src/lib-storage/index/mbox/istream-raw-mbox.c
src/lib-storage/index/mbox/mbox-save.c
src/lib-storage/index/mbox/mbox-storage.h
src/lib-storage/index/mbox/mbox-sync-private.h
src/lib-storage/index/pop3c/pop3c-client.c
src/lib-storage/index/pop3c/pop3c-storage.h
src/lib-storage/index/raw/raw-storage.h
src/lib-storage/list/mailbox-list-fs-iter.c
src/lib-storage/list/mailbox-list-index-notify.c
src/lib-storage/list/mailbox-list-index-sync.h
src/lib-storage/list/mailbox-list-index.h
src/lib-storage/list/mailbox-list-iter.c
src/lib-storage/list/mailbox-list-none.c
src/lib-storage/mail-namespace.h
src/lib-storage/mail-search-register.c
src/lib-storage/mail-search.h
src/lib-storage/mail-storage-private.h
src/lib-storage/mail-storage-service.c
src/lib-storage/mail-storage-service.h
src/lib-storage/mail-storage.h
src/lib-storage/mail-user.h
src/lib-storage/mailbox-list-private.h
src/lib-storage/mailbox-search-result-private.h
src/lib-storage/mailbox-tree.c
src/lib/buffer.c
src/lib/connection.h
src/lib/file-dotlock.c
src/lib/file-dotlock.h
src/lib/ioloop-private.h
src/lib/istream-crlf.c
src/lib/istream-file-private.h
src/lib/istream-jsonstr.c
src/lib/istream-mmap.c
src/lib/istream-private.h
src/lib/istream-tee.c
src/lib/istream.h
src/lib/mempool.h
src/lib/module-dir.h
src/lib/ostream-file-private.h
src/lib/ostream-private.h
src/lib/ostream.h
src/lmtp/client.h
src/lmtp/lmtp-proxy.c
src/log/log-connection.c
src/login-common/client-common.h
src/login-common/login-proxy.c
src/login-common/ssl-proxy-openssl.c
src/master/service-process.h
src/master/service.h
src/plugins/acl/acl-api-private.h
src/plugins/acl/acl-api.h
src/plugins/acl/acl-backend-vfile.h
src/plugins/acl/acl-lookup-dict.c
src/plugins/acl/acl-mailbox-list.c
src/plugins/expire/expire-plugin.c
src/plugins/fts-lucene/fts-backend-lucene.c
src/plugins/fts-solr/fts-backend-solr.c
src/plugins/fts-solr/solr-connection.c
src/plugins/fts-squat/squat-trie-private.h
src/plugins/fts-squat/squat-trie.c
src/plugins/fts-squat/squat-uidlist.c
src/plugins/fts/fts-api-private.h
src/plugins/fts/fts-indexer.c
src/plugins/fts/fts-storage.c
src/plugins/fts/fts-storage.h
src/plugins/lazy-expunge/lazy-expunge-plugin.c
src/plugins/pop3-migration/pop3-migration-plugin.c
src/plugins/quota/quota-fs.c
src/plugins/quota/quota-maildir.c
src/plugins/quota/quota-private.h
src/plugins/quota/quota-storage.c
src/plugins/virtual/virtual-mail.c
src/plugins/virtual/virtual-storage.h
src/plugins/virtual/virtual-sync.c
src/pop3/pop3-client.h
src/replication/replicator/dsync-client.c
src/replication/replicator/notify-connection.c
src/replication/replicator/replicator-brain.c
src/replication/replicator/replicator-queue.h

index ae30d22f79cbff6c132fb26502130cb8896c863a..40fd9c4d1b88419d67e9278c0f51afab2bff0613 100644 (file)
@@ -25,10 +25,10 @@ struct anvil_connection {
        struct ostream *output;
        struct io *io;
 
-       unsigned int version_received:1;
-       unsigned int handshaked:1;
-       unsigned int master:1;
-       unsigned int fifo:1;
+       bool version_received:1;
+       bool handshaked:1;
+       bool master:1;
+       bool fifo:1;
 };
 
 static struct anvil_connection *anvil_connections = NULL;
index 0d0ba10616c6333b4a6132fb3229aa415b3120e8..7f7452ed453a711f5a40e49d4e04ebb4d65e4b8d 100644 (file)
@@ -31,7 +31,7 @@ struct penalty_rec {
 
        unsigned int penalty:16;
        unsigned int last_update:LAST_UPDATE_BITS; /* last_penalty + n */
-       unsigned int checksum_is_pointer:1;
+       bool checksum_is_pointer:1;
        /* we use value up to two different checksums.
           after that switch to pointer. */
        union {
index 93a906d2cab994384b6676bcdfbc09dc6a133ea7..a42ec72415da26e281727e81acffab004dca4a76 100644 (file)
@@ -18,9 +18,9 @@ struct auth_client_connection {
        uint8_t cookie[MASTER_AUTH_COOKIE_SIZE];
        struct auth_request_handler *request_handler;
 
-       unsigned int login_requests:1;
-       unsigned int version_received:1;
-       unsigned int token_auth:1;
+       bool login_requests:1;
+       bool version_received:1;
+       bool token_auth:1;
 };
 
 void auth_client_connection_create(struct auth *auth, int fd,
index 90756ae5660252ce615fc51306767a0970134d04..d59c6a613f1c8b4afff4192fc6b849327c2b350c 100644 (file)
@@ -20,9 +20,9 @@ struct auth_master_connection {
           this uid. Don't allow LIST/PASS lookups. */
        uid_t userdb_restricted_uid;
 
-       unsigned int version_received:1;
-       unsigned int destroyed:1;
-       unsigned int userdb_only:1;
+       bool version_received:1;
+       bool destroyed:1;
+       bool userdb_only:1;
 };
 
 struct auth_master_connection *
index 3506040ce7cb7c24d224866625d57bdc4b7323ce..a9a7b37a5f79507e5beb5e055b3be4e45f677271 100644 (file)
@@ -24,7 +24,7 @@ struct auth_penalty_request {
 struct auth_penalty {
        struct anvil_client *client;
 
-       unsigned int disabled:1;
+       bool disabled:1;
 };
 
 struct auth_penalty *auth_penalty_init(const char *path)
index db3a1d97f64a29e0acc30d5379d39a91bae3198b..a270218058ad9d26786a347ee067a81b63388d75 100644 (file)
@@ -29,7 +29,7 @@ struct auth_postfix_connection {
        struct ostream *output;
        struct io *io;
 
-       unsigned int destroyed:1;
+       bool destroyed:1;
 };
 
 static void postfix_input(struct auth_postfix_connection *conn);
index b42f490ed0bfb852e00e62aac5a3601c22139f9c..c1af5c1fff25a4145581ff36c23ee20940320d15 100644 (file)
@@ -32,8 +32,8 @@ struct auth_request_handler {
 
        auth_master_request_callback_t *master_callback;
 
-       unsigned int destroyed:1;
-       unsigned int token_auth:1;
+       bool destroyed:1;
+       bool token_auth:1;
 };
 
 static ARRAY(struct auth_request *) auth_failures_arr;
index d2778ef4ef8f246b34f8fdffe4b1bd3ec1101d51..dcb9e2148f1441bfb21742e00769cfaff2fab108 100644 (file)
@@ -96,53 +96,53 @@ struct auth_request {
 
        /* this is a lookup on auth socket (not login socket).
           skip any proxying stuff if enabled. */
-       unsigned int auth_only:1;
+       bool auth_only:1;
        /* we're doing a userdb lookup now (we may have done passdb lookup
           earlier) */
-       unsigned int userdb_lookup:1;
+       bool userdb_lookup:1;
        /* DIGEST-MD5 kludge */
-       unsigned int domain_is_realm:1;
+       bool domain_is_realm:1;
        /* auth_debug is enabled for this request */
-       unsigned int debug:1;
+       bool debug:1;
 
        /* flags received from auth client: */
-       unsigned int secured:1;
-       unsigned int final_resp_ok:1;
-       unsigned int no_penalty:1;
-       unsigned int valid_client_cert:1;
-       unsigned int cert_username:1;
-       unsigned int request_auth_token:1;
+       bool secured:1;
+       bool final_resp_ok:1;
+       bool no_penalty:1;
+       bool valid_client_cert:1;
+       bool cert_username:1;
+       bool request_auth_token:1;
 
        /* success/failure states: */
-       unsigned int successful:1;
-       unsigned int failed:1; /* overrides any other success */
-       unsigned int internal_failure:1;
-       unsigned int passdbs_seen_user_unknown:1;
-       unsigned int passdbs_seen_internal_failure:1;
-       unsigned int userdbs_seen_internal_failure:1;
+       bool successful:1;
+       bool failed:1; /* overrides any other success */
+       bool internal_failure:1;
+       bool passdbs_seen_user_unknown:1;
+       bool passdbs_seen_internal_failure:1;
+       bool userdbs_seen_internal_failure:1;
 
        /* current state: */
-       unsigned int accept_cont_input:1;
-       unsigned int skip_password_check:1;
-       unsigned int prefer_plain_credentials:1;
-       unsigned int in_delayed_failure_queue:1;
-       unsigned int removed_from_handler:1;
-       unsigned int snapshot_have_userdb_prefetch_set:1;
+       bool accept_cont_input:1;
+       bool skip_password_check:1;
+       bool prefer_plain_credentials:1;
+       bool in_delayed_failure_queue:1;
+       bool removed_from_handler:1;
+       bool snapshot_have_userdb_prefetch_set:1;
        /* each passdb lookup can update the current success-status using the
           result_* rules. the authentication succeeds only if this is TRUE
           at the end. mechanisms that don't require passdb, but do a passdb
           lookup anyway (e.g. GSSAPI) need to set this to TRUE by default. */
-       unsigned int passdb_success:1;
+       bool passdb_success:1;
        /* userdb equivalent of passdb_success */
-       unsigned int userdb_success:1;
+       bool userdb_success:1;
        /* the last userdb lookup failed either due to "tempfail" extra field
           or because one of the returned uid/gid fields couldn't be translated
           to a number */
-       unsigned int userdb_lookup_tempfailed:1;
+       bool userdb_lookup_tempfailed:1;
        /* userdb_* fields have been set by the passdb lookup, userdb prefetch
           will work. */
-       unsigned int userdb_prefetch_set:1;
-       unsigned int stats_sent:1;
+       bool userdb_prefetch_set:1;
+       bool stats_sent:1;
 
        /* ... mechanism specific data ... */
 };
index 5c909d29a4b45304ee13fb3d32945ae36322625f..eb49c33a59f3b2956c2d632c450a0d3111902f93 100644 (file)
@@ -34,9 +34,9 @@ struct auth_worker_client {
        struct timeout *to_idle;
        time_t cmd_start;
 
-       unsigned int version_received:1;
-       unsigned int dbhash_received:1;
-       unsigned int error_sent:1;
+       bool version_received:1;
+       bool dbhash_received:1;
+       bool error_sent:1;
 };
 
 struct auth_worker_list_context {
index 49453cb240c58a8f5d0e99a6464d2801f8b082aa..60ed1920457d2605f88ad572b19bc7047e131a7f 100644 (file)
@@ -48,11 +48,11 @@ struct auth_worker_connection {
        struct auth_worker_request *request;
        unsigned int id_counter;
 
-       unsigned int received_error:1;
-       unsigned int restart:1;
-       unsigned int shutdown:1;
-       unsigned int timeout_pending_resume:1;
-       unsigned int resuming:1;
+       bool received_error:1;
+       bool restart:1;
+       bool shutdown:1;
+       bool timeout_pending_resume:1;
+       bool resuming:1;
 };
 
 static ARRAY(struct auth_worker_connection *) connections = ARRAY_INIT;
index 5c984cdf98ae48ba6366135650b61b334164f2c3..79ba1373fc3f15c1521babe4bedd4bafffd315aa 100644 (file)
@@ -38,7 +38,7 @@ struct chkpw_auth_request {
        unsigned int output_pos, output_len;
 
        int exit_status;
-       unsigned int exited:1;
+       bool exited:1;
 };
 
 struct db_checkpassword {
index a137ee17e166b3d4d1c18d1d32058187f3e8a1ba..ca41790efc8e787e7b4afae75a501d98aae39e7b 100644 (file)
@@ -38,10 +38,10 @@ struct db_passwd_file {
        HASH_TABLE(char *, struct passwd_file *) files;
         struct passwd_file *default_file;
 
-       unsigned int vars:1;
-       unsigned int userdb:1;
-       unsigned int userdb_warn_missing:1;
-       unsigned int debug:1;
+       bool vars:1;
+       bool userdb:1;
+       bool userdb_warn_missing:1;
+       bool debug:1;
 };
 
 struct passwd_user *
index 3bd6a1a0fa86a30f9a0bd2752947ff648d820850..e985f1d5e580279b812513654c2ee1c04325bb77 100644 (file)
@@ -24,11 +24,11 @@ struct sql_connection {
        struct sql_settings set;
        struct sql_db *db;
 
-       unsigned int default_password_query:1;
-       unsigned int default_user_query:1;
-       unsigned int default_update_query:1;
-       unsigned int default_iterate_query:1;
-       unsigned int userdb_used:1;
+       bool default_password_query:1;
+       bool default_user_query:1;
+       bool default_update_query:1;
+       bool default_iterate_query:1;
+       bool userdb_used:1;
 };
 
 struct sql_connection *db_sql_init(const char *config_path, bool userdb);
index 9d7db62a970a6366151ebc124aed3c32121f8f9e..cedd06273f7f477771ef63675534a01a6a58c540 100644 (file)
@@ -47,7 +47,7 @@ struct digest_auth_request {
        char *authzid; /* may be NULL, authorization ID */
        unsigned char response[32];
        unsigned long maxbuf;
-       unsigned int nonce_found:1;
+       bool nonce_found:1;
 
        /* final reply: */
        char *rspauth;
index f00eb50d873776eed41d5705998025ab697320f3..9824431b290736d26a3190371ecc49505f2c1b55 100644 (file)
@@ -42,9 +42,9 @@ struct pam_passdb_module {
        const char *service_name, *pam_cache_key;
        unsigned int requests_left;
 
-       unsigned int pam_setcred:1;
-       unsigned int pam_session:1;
-       unsigned int failure_show_msg:1;
+       bool pam_setcred:1;
+       bool pam_session:1;
+       bool failure_show_msg:1;
 };
 
 struct pam_conv_context {
index e6f9b802be20472839aa9aa984f083fa95f0ec59..f50bcba18f157dd1cfe198a288db202696adce9e 100644 (file)
@@ -21,7 +21,7 @@ struct passwd_userdb_module {
        struct userdb_template *tmpl;
 
        unsigned int fast_count, slow_count;
-       unsigned int slow_warned:1;
+       bool slow_warned:1;
 };
 
 struct passwd_userdb_iterate_context {
index 80d6fa887cb1d306ca72dfd37557f29b35ee3948..7bdd6b111ccfee27fa79321bd219028918208f0f 100644 (file)
@@ -24,8 +24,8 @@ struct userdb_sql_request {
 struct sql_userdb_iterate_context {
        struct userdb_iterate_context ctx;
        struct sql_result *result;
-       unsigned int freed:1;
-       unsigned int call_iter:1;
+       bool freed:1;
+       bool call_iter:1;
 };
 
 static void userdb_sql_iterate_next(struct userdb_iterate_context *_ctx);
index 9181e229661f95187ec79c2eb16a449801880c78..bf8c9af093e0508845d0aa819371ed744fbac495 100644 (file)
@@ -18,7 +18,7 @@ struct static_userdb_module {
        struct userdb_module module;
        struct userdb_template *tmpl;
 
-       unsigned int allow_all_users:1;
+       bool allow_all_users:1;
 };
 
 static void static_lookup_real(struct auth_request *auth_request,
index 7df5b0e1eaad67f9081be69dd207750c99200450..b09ebea57398a2202fd7401cc8d9a6061ed05f0c 100644 (file)
@@ -27,8 +27,8 @@ struct config_connection {
        struct ostream *output;
        struct io *io;
 
-       unsigned int version_received:1;
-       unsigned int handshaked:1;
+       bool version_received:1;
+       bool handshaked:1;
 };
 
 static struct config_connection *config_connections = NULL;
index 8c18abdd8009a80f10bba656cc8306c2aa5c2c72..da58a550c6af0aad1f8d7ba8f4630d5e09dc0129 100644 (file)
@@ -56,8 +56,8 @@ struct config_parser_context {
 
        HASH_TABLE(const char *, const char *) seen_settings;
        struct config_filter_context *filter;
-       unsigned int expand_values:1;
-       unsigned int hide_errors:1;
+       bool expand_values:1;
+       bool hide_errors:1;
 };
 
 extern void (*hook_config_parser_begin)(struct config_parser_context *ctx);
index 152333ca352e8b47cc9707479881ea084b3034d9..a07a2892485d33e40a2898045275ac26d2b777be 100644 (file)
@@ -38,7 +38,7 @@ struct config_dump_human_context {
        ARRAY_TYPE(const_string) errors;
        struct config_export_context *export_ctx;
 
-       unsigned int list_prefix_sent:1;
+       bool list_prefix_sent:1;
 };
 
 #define LIST_KEY_PREFIX "\001"
index 2f9149c0f05b76b8a5cb6b7f2eba3d2ff364ba3c..6fd55b86a41b2df3c05870a1c573e1ff4569cf54 100644 (file)
@@ -31,7 +31,7 @@ struct dict_connection {
        ARRAY(struct dict_connection_transaction) transactions;
        ARRAY(struct dict_connection_cmd *) cmds;
 
-       unsigned int destroyed:1;
+       bool destroyed:1;
 };
 
 struct dict_connection *dict_connection_create(int fd);
index 5121758ecd523d4acc77efd73a87068d7e70d883..84d711573ca29c0bab98fb7f5961d53708b4a08b 100644 (file)
@@ -116,19 +116,19 @@ struct director_connection {
        /* set during command execution */
        const char *cur_cmd, *cur_line;
 
-       unsigned int in:1;
-       unsigned int connected:1;
-       unsigned int version_received:1;
-       unsigned int me_received:1;
-       unsigned int handshake_received:1;
-       unsigned int ignore_host_events:1;
-       unsigned int handshake_sending_hosts:1;
-       unsigned int ping_waiting:1;
-       unsigned int synced:1;
-       unsigned int wrong_host:1;
-       unsigned int verifying_left:1;
-       unsigned int users_unsorted:1;
-       unsigned int done_pending:1;
+       bool in:1;
+       bool connected:1;
+       bool version_received:1;
+       bool me_received:1;
+       bool handshake_received:1;
+       bool ignore_host_events:1;
+       bool handshake_sending_hosts:1;
+       bool ping_waiting:1;
+       bool synced:1;
+       bool wrong_host:1;
+       bool verifying_left:1;
+       bool users_unsorted:1;
+       bool done_pending:1;
 };
 
 static void director_connection_disconnected(struct director_connection **conn,
index 08c1020da33b74f2bce3dc5a22b663cc87f1497d..936d6b76313da0d33f0130bd6086fcf16ebfe35f 100644 (file)
@@ -31,8 +31,8 @@ struct director_host {
        time_t last_network_failure;
        time_t last_protocol_failure;
        /* we are this director */
-       unsigned int self:1;
-       unsigned int removed:1;
+       bool self:1;
+       bool removed:1;
 };
 
 struct director_host *
index a2e5c5469fcff9ca0555421ca1da1fc37893627e..ef3e6cb6eb8124b6bd0964a0f87429da58c6c006 100644 (file)
@@ -90,11 +90,11 @@ struct director {
 
        /* director ring handshaking is complete.
           director can start serving clients. */
-       unsigned int ring_handshaked:1;
-       unsigned int ring_handshake_warning_sent:1;
-       unsigned int ring_synced:1;
-       unsigned int sync_frozen:1;
-       unsigned int sync_pending:1;
+       bool ring_handshaked:1;
+       bool ring_handshake_warning_sent:1;
+       bool ring_synced:1;
+       bool sync_frozen:1;
+       bool sync_pending:1;
 };
 
 extern bool director_debug;
index 0b93885e5257ab3c7f756b5b3c89b1516e0066c7..79a9e750d17f718557089eaff04672a11fdea975 100644 (file)
@@ -34,7 +34,7 @@ struct doveadm_connection {
        struct ostream *output;
        struct director *dir;
 
-       unsigned int handshaked:1;
+       bool handshaked:1;
 };
 
 static struct doveadm_connection *doveadm_connections;
index d57c912b178e0d10f34d99347948391c5a3d035f..f6b7459d215114ee1b52599d3990ed9c40734d87 100644 (file)
@@ -31,8 +31,8 @@ struct login_connection {
        struct auth_connection *auth;
        struct director *dir;
 
-       unsigned int handshaked:1;
-       unsigned int destroyed:1;
+       bool handshaked:1;
+       bool destroyed:1;
 };
 
 struct login_host_request {
index 76521a635741af56a93ca4f1a6ba9dd0992d63c5..1ae1418ca6bcf7c76276edb7d455b7beef3126b4 100644 (file)
@@ -20,7 +20,7 @@ struct mail_host {
        struct mail_tag *tag;
 
        /* host was recently changed and ring hasn't synced yet since */
-       unsigned int desynced:1;
+       bool desynced:1;
 };
 ARRAY_DEFINE_TYPE(mail_host, struct mail_host *);
 
index b643cf5f861e1ea657b0077adf9805ebdb444a42..cbcd4a6934820c2e9daf41129c3edc4f5c36a751 100644 (file)
@@ -45,7 +45,7 @@ struct user {
        /* TRUE, if the user's timestamp was close to being expired and we're
           now doing a ring-wide sync for this user to make sure we don't
           assign conflicting hosts to it */
-       unsigned int weak:1;
+       bool weak:1;
 };
 
 /* Create a new directory. Users are dropped if their time gets older
index 1daf8fd7a86a8bad583b6824b3fce9299047daca..f1546cd68a6c58e30cd900fb33a9d94a7d64681f 100644 (file)
@@ -15,8 +15,8 @@ struct client_connection {
        in_port_t local_port, remote_port;
        const struct doveadm_settings *set;
 
-       unsigned int handshaked:1;
-       unsigned int authenticated:1;
+       bool handshaked:1;
+       bool authenticated:1;
 };
 
 struct client_connection *
index f77c76d36ae880ad6e7c97ddcced7613908e86ad..0a5afb119f19f2e3dae34454c81904defe85e9a0 100644 (file)
@@ -90,19 +90,19 @@ struct dsync_cmd_context {
 
        unsigned int lock_timeout;
 
-       unsigned int lock:1;
-       unsigned int purge_remote:1;
-       unsigned int sync_visible_namespaces:1;
-       unsigned int default_replica_location:1;
-       unsigned int oneway:1;
-       unsigned int backup:1;
-       unsigned int reverse_backup:1;
-       unsigned int remote_user_prefix:1;
-       unsigned int no_mail_sync:1;
-       unsigned int no_mailbox_renames:1;
-       unsigned int local_location_from_arg:1;
-       unsigned int replicator_notify:1;
-       unsigned int exited:1;
+       bool lock:1;
+       bool purge_remote:1;
+       bool sync_visible_namespaces:1;
+       bool default_replica_location:1;
+       bool oneway:1;
+       bool backup:1;
+       bool reverse_backup:1;
+       bool remote_user_prefix:1;
+       bool no_mail_sync:1;
+       bool no_mailbox_renames:1;
+       bool local_location_from_arg:1;
+       bool replicator_notify:1;
+       bool exited:1;
 };
 
 static bool legacy_dsync = FALSE;
index b0e1207a819e3b16abe881069ff19ad8a21cc43d..d0c6216d5dd4813df780fcafda8cea4df165bd37 100644 (file)
@@ -22,8 +22,8 @@ struct index_cmd_context {
 
        int queue_fd;
        unsigned int max_recent_msgs;
-       unsigned int queue:1;
-       unsigned int have_wildcards:1;
+       bool queue:1;
+       bool have_wildcards:1;
 };
 
 static int cmd_index_box_precache(struct mailbox *box)
index 36606944c2811b71af70d41f37600c003e4e5077..19edba82ec34a6b49fe773f0e822ec7a435a5bdb 100644 (file)
@@ -30,7 +30,7 @@ struct status_cmd_context {
        struct mailbox_status total_status;
        struct mailbox_metadata total_metadata;
 
-       unsigned int total_sum:1;
+       bool total_sum:1;
 };
 
 static void status_parse_fields(struct status_cmd_context *ctx,
index fce8204fdcd7ef4a4ce211ce205c421ef87dcf2a..1450f876bae405d2c5d2f36aead62dd70a9ee025 100644 (file)
@@ -92,13 +92,13 @@ struct doveadm_mail_cmd_context {
        int exit_code;
 
        /* This command is being called by a remote doveadm client. */
-       unsigned int proxying:1;
+       bool proxying:1;
        /* We're handling only a single user */
-       unsigned int iterate_single_user:1;
+       bool iterate_single_user:1;
        /* We're going through all users (not set for wildcard usernames) */
-       unsigned int iterate_all_users:1;
+       bool iterate_all_users:1;
        /* Running from CLI doveadm (not doveadm-server) */
-       unsigned int cli:1;
+       bool cli:1;
 };
 
 struct doveadm_mail_cmd {
index 9b0c51f38b16138c3a93bd0523eea06240b45d35..f2a6ebee3401d3714237ee682dea52219a887579 100644 (file)
@@ -15,7 +15,7 @@ struct doveadm_print_flow_context {
        ARRAY(struct doveadm_print_flow_header) headers;
        unsigned int header_idx;
 
-       unsigned int streaming:1;
+       bool streaming:1;
 };
 
 static struct doveadm_print_flow_context *ctx;
index 3a10997267003d57707a0967aa5161a5cb19aded..12852a9b8f008257eb7a9d4c59496074a2a12795 100644 (file)
@@ -14,8 +14,8 @@ struct doveadm_print_pager_context {
        ARRAY(struct doveadm_print_pager_header) headers;
        unsigned int header_idx;
 
-       unsigned int streaming:1;
-       unsigned int first_page:1;
+       bool streaming:1;
+       bool first_page:1;
 };
 
 static struct doveadm_print_pager_context *ctx;
index e6b241172b7c4902c3cb31cc37b72a2c82a43572..2d5059a0dc0f0075685e5586cccc472bdf3ed722 100644 (file)
@@ -8,7 +8,7 @@
 struct doveadm_print_tab_context {
        unsigned int header_idx, header_count;
 
-       unsigned int header_written:1;
+       bool header_written:1;
 };
 
 static struct doveadm_print_tab_context ctx;
index 0c0c0b4dcd4b4ac6ef6dea0b3f193469ad0eac60..5cadd53244c402c62e69cb388426e612f82e8366 100644 (file)
@@ -30,7 +30,7 @@ struct doveadm_print_table_context {
        unsigned int hdr_idx;
        unsigned int columns;
 
-       unsigned int lengths_set:1;
+       bool lengths_set:1;
 };
 
 static struct doveadm_print_table_context *ctx;
index 6a7470e78eef72a9e744a3147b981dbe8e625bf7..c9f5bd1ef5f067f342e7606c3d8b1d7d8a9bd48d 100644 (file)
@@ -22,7 +22,7 @@ struct top_line {
        /* [headers_count] */
        const char **prev_values, **cur_values;
 
-       unsigned int flip:1;
+       bool flip:1;
 };
 
 struct top_context {
@@ -43,7 +43,7 @@ struct top_context {
        unsigned int last_update_idx, user_idx;
        unsigned int sort_idx1, sort_idx2;
 
-       unsigned int flip:1;
+       bool flip:1;
 };
 
 static struct top_context *sort_ctx = NULL;
index bba71841867a1520c9c9d8e42cb41838b5a29889..67e9e9cac44f11633a64682a4acf41eb7d6c1e21 100644 (file)
@@ -97,23 +97,23 @@ struct dsync_brain {
 
        enum mail_error mail_error;
 
-       unsigned int master_brain:1;
-       unsigned int mail_requests:1;
-       unsigned int backup_send:1;
-       unsigned int backup_recv:1;
-       unsigned int purge:1;
-       unsigned int debug:1;
-       unsigned int sync_visible_namespaces:1;
-       unsigned int no_mail_sync:1;
-       unsigned int no_backup_overwrite:1;
-       unsigned int no_mail_prefetch:1;
-       unsigned int no_mailbox_renames:1;
-       unsigned int changes_during_sync:1;
-       unsigned int require_full_resync:1;
-       unsigned int verbose_proctitle:1;
-       unsigned int no_notify:1;
-       unsigned int hdr_hash_v2:1;
-       unsigned int failed:1;
+       bool master_brain:1;
+       bool mail_requests:1;
+       bool backup_send:1;
+       bool backup_recv:1;
+       bool purge:1;
+       bool debug:1;
+       bool sync_visible_namespaces:1;
+       bool no_mail_sync:1;
+       bool no_backup_overwrite:1;
+       bool no_mail_prefetch:1;
+       bool no_mailbox_renames:1;
+       bool changes_during_sync:1;
+       bool require_full_resync:1;
+       bool verbose_proctitle:1;
+       bool no_notify:1;
+       bool hdr_hash_v2:1;
+       bool failed:1;
 };
 
 extern const char *dsync_box_state_names[DSYNC_BOX_STATE_DONE+1];
index 62112c0e9caacdf503a0542361fb6419cf4a7b90..b274360b3a1d5915ef1810fd64d2b981c4624e77 100644 (file)
@@ -85,8 +85,8 @@ struct dsync_ibc {
        io_callback_t *io_callback;
        void *io_context;
 
-       unsigned int failed:1;
-       unsigned int timeout:1;
+       bool failed:1;
+       bool timeout:1;
 };
 
 #endif
index 74ac62e4b25b3b74ab76e84f7f465224d22b4fb6..f4b23f924907cfbcd51ad982c44e5e04ae9f3780 100644 (file)
@@ -160,15 +160,15 @@ struct dsync_ibc_stream {
        char value_output_last;
 
        enum item_type last_recv_item, last_sent_item;
-       unsigned int last_recv_item_eol:1;
-       unsigned int last_sent_item_eol:1;
-
-       unsigned int version_received:1;
-       unsigned int handshake_received:1;
-       unsigned int has_pending_data:1;
-       unsigned int finish_received:1;
-       unsigned int done_received:1;
-       unsigned int stopped:1;
+       bool last_recv_item_eol:1;
+       bool last_sent_item_eol:1;
+
+       bool version_received:1;
+       bool handshake_received:1;
+       bool has_pending_data:1;
+       bool finish_received:1;
+       bool done_received:1;
+       bool stopped:1;
 };
 
 static const char *dsync_ibc_stream_get_state(struct dsync_ibc_stream *ibc)
index 0267f86f2a406eb54a136c6cbbc8cdbdc687bed2..32f89d360ea47d4d6bf3f122fdf5f176bcb46047 100644 (file)
@@ -57,13 +57,13 @@ struct dsync_mailbox_exporter {
        const char *error;
        enum mail_error mail_error;
 
-       unsigned int body_search_initialized:1;
-       unsigned int auto_export_mails:1;
-       unsigned int mails_have_guids:1;
-       unsigned int minimal_dmail_fill:1;
-       unsigned int return_all_mails:1;
-       unsigned int export_received_timestamps:1;
-       unsigned int no_hdr_hashes:1;
+       bool body_search_initialized:1;
+       bool auto_export_mails:1;
+       bool mails_have_guids:1;
+       bool minimal_dmail_fill:1;
+       bool return_all_mails:1;
+       bool export_received_timestamps:1;
+       bool no_hdr_hashes:1;
 };
 
 static int dsync_mail_error(struct dsync_mailbox_exporter *exporter,
index c64f6bd114770b1c1cc8d499120ea83a466de39c..877305cd5a1a19093813a5e60adc872156c6056e 100644 (file)
@@ -39,11 +39,11 @@ struct importer_new_mail {
        /* UID for the mail in the virtual \All mailbox */
        uint32_t virtual_all_uid;
 
-       unsigned int uid_in_local:1;
-       unsigned int uid_is_usable:1;
-       unsigned int skip:1;
-       unsigned int expunged:1;
-       unsigned int copy_failed:1;
+       bool uid_in_local:1;
+       bool uid_is_usable:1;
+       bool skip:1;
+       bool expunged:1;
+       bool copy_failed:1;
 };
 
 /* for quickly testing that two-way sync doesn't actually do any unexpected
@@ -107,21 +107,21 @@ struct dsync_mailbox_importer {
 
        enum mail_error mail_error;
 
-       unsigned int failed:1;
-       unsigned int require_full_resync:1;
-       unsigned int debug:1;
-       unsigned int stateful_import:1;
-       unsigned int last_common_uid_found:1;
-       unsigned int cur_uid_has_change:1;
-       unsigned int cur_mail_skip:1;
-       unsigned int local_expunged_guids_set:1;
-       unsigned int new_uids_assigned:1;
-       unsigned int want_mail_requests:1;
-       unsigned int master_brain:1;
-       unsigned int revert_local_changes:1;
-       unsigned int mails_have_guids:1;
-       unsigned int mails_use_guid128:1;
-       unsigned int delete_mailbox:1;
+       bool failed:1;
+       bool require_full_resync:1;
+       bool debug:1;
+       bool stateful_import:1;
+       bool last_common_uid_found:1;
+       bool cur_uid_has_change:1;
+       bool cur_mail_skip:1;
+       bool local_expunged_guids_set:1;
+       bool new_uids_assigned:1;
+       bool want_mail_requests:1;
+       bool master_brain:1;
+       bool revert_local_changes:1;
+       bool mails_have_guids:1;
+       bool mails_use_guid128:1;
+       bool delete_mailbox:1;
 };
 
 static const char *dsync_mail_change_type_names[] = {
index d317aaa34f00041dc27ceac27c924cbbdb888c3f..454790c63676e12c7211f64dad411580bbb7d784 100644 (file)
@@ -60,11 +60,11 @@ struct dsync_mailbox_node {
        /* last time the subscription state was changed, 0 if not known */
        time_t last_subscription_change;
        /* is this mailbox or directory subscribed? */
-       unsigned int subscribed:1;
+       bool subscribed:1;
 
        /* Internal syncing flags: */
-       unsigned int sync_delayed_guid_change:1;
-       unsigned int sync_temporary_name:1;
+       bool sync_delayed_guid_change:1;
+       bool sync_temporary_name:1;
 };
 ARRAY_DEFINE_TYPE(dsync_mailbox_node, struct dsync_mailbox_node *);
 
index 979a5622f8b4d2c27091a89f7e8c28adcafc618b..59562715daf6a29e4bb36013e5514f2507734253 100644 (file)
@@ -51,9 +51,9 @@ struct server_connection {
 
        enum server_reply_state state;
 
-       unsigned int handshaked:1;
-       unsigned int authenticated:1;
-       unsigned int streaming:1;
+       bool handshaked:1;
+       bool authenticated:1;
+       bool streaming:1;
 };
 
 static struct server_connection *printing_conn = NULL;
index 19c8739b933ba574179ad10dafcd1e9d0d3499bc..6589c1f7810c56fe607d626644fedeceaf74a4f8 100644 (file)
@@ -34,15 +34,15 @@ struct imap_client {
        const char *cmd_tag, *cmd_name;
        struct imap_client_cmd_id *cmd_id;
 
-       unsigned int cmd_finished:1;
-       unsigned int proxy_sasl_ir:1;
-       unsigned int proxy_logindisabled:1;
-       unsigned int proxy_seen_banner:1;
-       unsigned int skip_line:1;
-       unsigned int id_logged:1;
-       unsigned int proxy_capability_request_sent:1;
-       unsigned int client_ignores_capability_resp_code:1;
-       unsigned int auth_mech_name_parsed:1;
+       bool cmd_finished:1;
+       bool proxy_sasl_ir:1;
+       bool proxy_logindisabled:1;
+       bool proxy_seen_banner:1;
+       bool skip_line:1;
+       bool id_logged:1;
+       bool proxy_capability_request_sent:1;
+       bool client_ignores_capability_resp_code:1;
+       bool auth_mech_name_parsed:1;
 };
 
 bool client_skip_line(struct imap_client *client);
index cb440dcbd630f6f8bbf1adab6a8a7a1786b04354..41b905606af7962220aaa6e26cdecdec304782c4 100644 (file)
@@ -27,7 +27,7 @@ struct client {
 
        enum imap_urlauth_worker_state worker_state;
 
-       unsigned int disconnected:1;
+       bool disconnected:1;
 };
 
 extern struct client *imap_urlauth_clients;
index f8153b68949dc558eb76c2beb7a5670e58b65bec..8a7713b1197194b7cd6c9d5502228eeae35b1cd7 100644 (file)
@@ -21,7 +21,7 @@ struct imap_urlauth_client {
 
        const struct imap_urlauth_login_settings *set;
 
-       unsigned int version_received:1;
+       bool version_received:1;
 };
 
 static void
index c508f224afbb2ccaeee8c5894774574ddbc0c526..7f5553b25716611cf77520946af67cc98b29fec5 100644 (file)
@@ -71,12 +71,12 @@ struct client {
        const struct imap_urlauth_worker_settings *set;
        const struct mail_storage_settings *mail_set;
 
-       unsigned int debug:1;
-       unsigned int finished:1;
-       unsigned int waiting_input:1;
-       unsigned int version_received:1;
-       unsigned int access_received:1;
-       unsigned int access_anonymous:1;
+       bool debug:1;
+       bool finished:1;
+       bool waiting_input:1;
+       bool version_received:1;
+       bool access_received:1;
+       bool access_anonymous:1;
 };
 
 static bool verbose_proctitle = FALSE;
index 2718734201d8de2ce96e476dda075cd5e57f2549..f0093113db724011e51852afecfa62f3f87dcd2d 100644 (file)
@@ -41,10 +41,10 @@ struct cmd_append_context {
        struct mail_save_context *save_ctx;
        unsigned int count;
 
-       unsigned int message_input:1;
-       unsigned int binary_input:1;
-       unsigned int catenate:1;
-       unsigned int failed:1;
+       bool message_input:1;
+       bool binary_input:1;
+       bool catenate:1;
+       bool failed:1;
 };
 
 static void cmd_append_finish(struct cmd_append_context *ctx);
index 921ba2bebaff3016aba15e0ec2949d210fcdbf8f..917326a8d4189a4145be8ff2146c38b165ffd32c 100644 (file)
@@ -16,8 +16,8 @@ struct cmd_idle_context {
        struct imap_sync_context *sync_ctx;
        struct timeout *keepalive_to, *to_hibernate;
 
-       unsigned int manual_cork:1;
-       unsigned int sync_pending:1;
+       bool manual_cork:1;
+       bool sync_pending:1;
 };
 
 static void idle_add_keepalive_timeout(struct cmd_idle_context *ctx);
index 39f47fd5eb54510bb2da7980dd0b2dc22400f6f2..e338ec2094d82f330b5e61670d21d513a977438f 100644 (file)
@@ -21,10 +21,10 @@ struct cmd_list_context {
 
        struct mailbox_list_iterate_context *list_iter;
 
-       unsigned int lsub:1;
-       unsigned int lsub_no_unsubscribed:1;
-       unsigned int used_listext:1;
-       unsigned int used_status:1;
+       bool lsub:1;
+       bool lsub_no_unsubscribed:1;
+       bool used_listext:1;
+       bool used_status:1;
 };
 
 static void
index 7558e23f81e779e4e03b7cc3893f459a65121c62..d1d01e223542da1999841f9f9bc77b1a5da89227 100644 (file)
@@ -24,7 +24,7 @@ struct imap_select_context {
        ARRAY_TYPE(uint32_t) qresync_sample_seqset;
        ARRAY_TYPE(uint32_t) qresync_sample_uidset;
 
-       unsigned int condstore:1;
+       bool condstore:1;
 };
 
 static int select_qresync_get_uids(struct imap_select_context *ctx,
index 50299f2478d24a3272cbb90a9f4bdd408c5548f1..bb22fa8570cde1e22c780ebb2d1e87628def03bd 100644 (file)
@@ -19,10 +19,10 @@ struct cmd_urlfetch_context {
        struct imap_urlauth_fetch *ufetch;
        struct istream *input;
 
-       unsigned int failed:1;
-       unsigned int finished:1;
-       unsigned int extended:1;
-       unsigned int in_io_handler:1;
+       bool failed:1;
+       bool finished:1;
+       bool extended:1;
+       bool in_io_handler:1;
 };
 
 struct cmd_urlfetch_url {
index 9b5415e26f20fd83232658c72061e3c7e123fc97..52ed2d87502e5e6e6d0489d687a3f914c5c5d439 100644 (file)
@@ -91,14 +91,14 @@ struct client_command_context {
 
        struct client_sync_context *sync;
 
-       unsigned int uid:1; /* used UID command */
-       unsigned int cancel:1; /* command is wanted to be cancelled */
-       unsigned int param_error:1;
-       unsigned int search_save_result:1; /* search result is being updated */
-       unsigned int search_save_result_used:1; /* command uses search save */
-       unsigned int temp_executed:1; /* temporary execution state tracking */
-       unsigned int tagline_sent:1;
-       unsigned int executing:1;
+       bool uid:1; /* used UID command */
+       bool cancel:1; /* command is wanted to be cancelled */
+       bool param_error:1;
+       bool search_save_result:1; /* search result is being updated */
+       bool search_save_result_used:1; /* command uses search save */
+       bool temp_executed:1; /* temporary execution state tracking */
+       bool tagline_sent:1;
+       bool executing:1;
 };
 
 struct imap_client_vfuncs {
@@ -183,25 +183,25 @@ struct client {
 
        /* syncing marks this TRUE when it sees \Deleted flags. this is by
           EXPUNGE for Outlook-workaround. */
-       unsigned int sync_seen_deletes:1;
-       unsigned int disconnected:1;
-       unsigned int destroyed:1;
-       unsigned int handling_input:1;
-       unsigned int syncing:1;
-       unsigned int id_logged:1;
-       unsigned int mailbox_examined:1;
-       unsigned int anvil_sent:1;
-       unsigned int tls_compression:1;
-       unsigned int input_skip_line:1; /* skip all the data until we've
+       bool sync_seen_deletes:1;
+       bool disconnected:1;
+       bool destroyed:1;
+       bool handling_input:1;
+       bool syncing:1;
+       bool id_logged:1;
+       bool mailbox_examined:1;
+       bool anvil_sent:1;
+       bool tls_compression:1;
+       bool input_skip_line:1; /* skip all the data until we've
                                           found a new line */
-       unsigned int modseqs_sent_since_sync:1;
-       unsigned int notify_immediate_expunges:1;
-       unsigned int notify_count_changes:1;
-       unsigned int notify_flag_changes:1;
-       unsigned int imap_metadata_enabled:1;
-       unsigned int nonpermanent_modseqs:1;
-       unsigned int state_import_bad_idle_done:1;
-       unsigned int state_import_idle_continue:1;
+       bool modseqs_sent_since_sync:1;
+       bool notify_immediate_expunges:1;
+       bool notify_count_changes:1;
+       bool notify_flag_changes:1;
+       bool imap_metadata_enabled:1;
+       bool nonpermanent_modseqs:1;
+       bool state_import_bad_idle_done:1;
+       bool state_import_idle_continue:1;
 };
 
 struct imap_module_register {
index 0cb0bd2b6705faa8564e9020d5042d7c7a44852a..70930706dd76465f2667827e98abd786103686c1 100644 (file)
@@ -21,9 +21,9 @@ struct imap_fetch_body_data {
        const char *section; /* NOTE: always uppercased */
        struct imap_msgpart *msgpart;
 
-       unsigned int partial:1;
-       unsigned int binary:1;
-       unsigned int binary_size:1;
+       bool partial:1;
+       bool binary:1;
+       bool binary_size:1;
 };
 
 static void fetch_read_error(struct imap_fetch_context *ctx,
index e2d12e836a14c267903535ae05e386a4f97c6a32..10e2c6f9b415aeae3f0c6509b18619b39801c5d2 100644 (file)
@@ -37,8 +37,8 @@ struct imap_fetch_context_handler {
        const char *name;
        const char *nil_reply;
 
-       unsigned int buffered:1;
-       unsigned int want_deinit:1;
+       bool buffered:1;
+       bool want_deinit:1;
 };
 
 struct imap_fetch_qresync_args {
@@ -61,14 +61,14 @@ struct imap_fetch_state {
        int (*cont_handler)(struct imap_fetch_context *ctx);
        uint64_t *cur_stats_sizep;
 
-       unsigned int fetching:1;
-       unsigned int seen_flags_changed:1;
-       unsigned int cur_first:1;
-       unsigned int cur_flushed:1;
-       unsigned int line_partial:1;
-       unsigned int line_finished:1;
-       unsigned int skipped_expunged_msgs:1;
-       unsigned int failed:1;
+       bool fetching:1;
+       bool seen_flags_changed:1;
+       bool cur_first:1;
+       bool cur_flushed:1;
+       bool line_partial:1;
+       bool line_finished:1;
+       bool skipped_expunged_msgs:1;
+       bool failed:1;
 };
 
 struct imap_fetch_context {
@@ -85,10 +85,10 @@ struct imap_fetch_context {
 
        struct imap_fetch_state state;
 
-       unsigned int initialized:1;
-       unsigned int flags_have_handler:1;
-       unsigned int flags_update_seen:1;
-       unsigned int flags_show_only_seen_changes:1;
+       bool initialized:1;
+       bool flags_have_handler:1;
+       bool flags_update_seen:1;
+       bool flags_show_only_seen_changes:1;
 };
 
 void imap_fetch_handlers_register(const struct imap_fetch_handler *handlers,
index 43f0dbbbf179346fb7094ae0842bf47d3314fb08..6d8990df0e56a7a1a4e7612444dbae3fd9f7296a 100644 (file)
@@ -49,12 +49,12 @@ struct imap_notify_context {
        struct imap_fetch_context *fetch_ctx;
        struct timeout *to_watch;
 
-       unsigned int have_subscriptions:1;
-       unsigned int selected_set:1;
-       unsigned int selected_immediate_expunges:1;
-       unsigned int send_immediate_status:1;
-       unsigned int watching_mailbox:1;
-       unsigned int notifying:1;
+       bool have_subscriptions:1;
+       bool selected_set:1;
+       bool selected_immediate_expunges:1;
+       bool send_immediate_status:1;
+       bool watching_mailbox:1;
+       bool notifying:1;
 };
 
 bool imap_notify_match_mailbox(struct imap_notify_namespace *notify_ns,
index 64ddc97072413ca4c62ea9b89ccfd51980b85d9b..f8d14c9588e03981037b46156fd8418fb7fb3099 100644 (file)
@@ -42,9 +42,9 @@ struct imap_search_context {
 
        uint64_t highest_seen_modseq;
 
-       unsigned int have_seqsets:1;
-       unsigned int have_modseqs:1;
-       unsigned int sorting:1;
+       bool have_seqsets:1;
+       bool have_modseqs:1;
+       bool sorting:1;
 };
 
 int cmd_search_parse_return_if_found(struct imap_search_context *ctx,
index 27f31d054301eeaddebdf5886a54975e9e0a349f..05d58f1f774806c8ff77253f8e66f5ad15c3872e 100644 (file)
@@ -44,11 +44,11 @@ struct imap_sync_context {
 
        unsigned int messages_count;
 
-       unsigned int failed:1;
-       unsigned int finished:1;
-       unsigned int no_newmail:1;
-       unsigned int have_new_mails:1;
-       unsigned int search_update_notifying:1;
+       bool failed:1;
+       bool finished:1;
+       bool no_newmail:1;
+       bool have_new_mails:1;
+       bool search_update_notifying:1;
 };
 
 static void uids_to_seqs(struct mailbox *box, ARRAY_TYPE(seq_range) *uids)
index 16c15a3f1e401f5affb5ff8327ff7b6a6d632168..dcf3dbf9bceb7d215ee2edf9a991e628bf669129 100644 (file)
@@ -27,9 +27,9 @@ struct indexer_client {
        struct ostream *output;
        struct io *io;
 
-       unsigned int version_received:1;
-       unsigned int handshaked:1;
-       unsigned int destroyed:1;
+       bool version_received:1;
+       bool handshaked:1;
+       bool destroyed:1;
 };
 
 struct indexer_client_request {
index aeddabcec89ccb71d84f84e167585961414a398a..2b5dd7a6c804dd25bb66e041b2fcd2b61f0f1eb6 100644 (file)
@@ -12,16 +12,16 @@ struct indexer_request {
        unsigned int max_recent_msgs;
 
        /* index messages in this mailbox */
-       unsigned int index:1;
+       bool index:1;
        /* optimize this mailbox */
-       unsigned int optimize:1;
+       bool optimize:1;
        /* currently indexing this mailbox */
-       unsigned int working:1;
+       bool working:1;
        /* after indexing is finished, add this request back to the queue and
           reindex it (i.e. a new indexing request came while we were
           working.) */
-       unsigned int reindex_head:1;
-       unsigned int reindex_tail:1;
+       bool reindex_head:1;
+       bool reindex_tail:1;
 
        /* when working finished, call this number of contexts and leave the
           rest to the reindexing. */
index 64a5c69726f6067947db8b044b6d09e45fb6fa84..d1e32ed1dd35d6e5cba7b0519cdbecf05cb97a44 100644 (file)
@@ -30,7 +30,7 @@ struct master_connection {
        struct istream *input;
        struct ostream *output;
 
-       unsigned int version_received:1;
+       bool version_received:1;
 };
 
 static void ATTR_NULL(1, 2)
index 445b00bcbeacdb5a3f7f0837ee4f383ab34dfa54..93d8e7171d7dc701ace41df6d179a35707fd62a2 100644 (file)
@@ -36,7 +36,7 @@ struct worker_connection {
        struct aqueue *request_queue;
 
        unsigned int process_limit;
-       unsigned int version_received:1;
+       bool version_received:1;
 };
 
 struct worker_connection *
index b9354062f6272a5ff92ac7bbc87c57a79f0b1940..83603b531744d9ce30546f0266df90fbf3e3a8f4 100644 (file)
@@ -29,8 +29,8 @@ struct ipc_connection {
        /* running commands */
        ARRAY(struct ipc_connection_cmd *) cmds;
 
-       unsigned int version_received:1;
-       unsigned int handshake_received:1;
+       bool version_received:1;
+       bool handshake_received:1;
 };
 
 struct ipc_connection *ipc_connection_create(int listen_fd, int fd);
index 8dceefd2e1cefa6bfe145c9aba182b9bec74d068..82b6d26bea6c787c8fdc70a5e39af9a3b8ac5f02 100644 (file)
@@ -14,7 +14,7 @@ struct auth_client {
 
        unsigned int request_id_counter;
 
-       unsigned int debug:1;
+       bool debug:1;
 };
 
 #endif
index 79dfb5955058f86a5dbbe767ad9541bab5d2e7c0..b2aae9e5ef71632f517af52a12ad59e8518fff82 100644 (file)
@@ -43,9 +43,9 @@ struct auth_master_connection {
                               void *context);
        void *reply_context;
 
-       unsigned int sent_handshake:1;
-       unsigned int handshaked:1;
-       unsigned int aborted:1;
+       bool sent_handshake:1;
+       bool handshaked:1;
+       bool aborted:1;
 };
 
 struct auth_master_lookup_ctx {
index 07de9c230f28c89b11d6b23cdcd829ba56d12d66..40c4baf2356bccba7f90f02941cd033ff4bc1ff1 100644 (file)
@@ -22,7 +22,7 @@ struct auth_user_reply {
        gid_t gid;
        const char *home, *chroot;
        ARRAY_TYPE(const_string) extra_fields;
-       unsigned int anonymous:1;
+       bool anonymous:1;
 };
 
 struct auth_master_connection *
index 51fc7f24b72ade467d691d1b94ddcd85cba94ce2..4e9c1a5c2b97829e1aa82b8ed49844a51ca5c4d3 100644 (file)
@@ -22,9 +22,9 @@ struct auth_server_connection {
        /* id => request */
        HASH_TABLE(void *, struct auth_client_request *) requests;
 
-       unsigned int version_received:1;
-       unsigned int handshake_received:1;
-       unsigned int has_plain_mech:1;
+       bool version_received:1;
+       bool handshake_received:1;
+       bool has_plain_mech:1;
 };
 
 struct auth_server_connection *
index 0ebca31f58d6ee55a9cc31b0f4629305b33cf2a5..c17d66fcd5eb423ce39d10a9ca98c0d05efeb2ac 100644 (file)
@@ -18,9 +18,9 @@ struct bzlib_istream {
        size_t high_pos;
        struct stat last_parent_statbuf;
 
-       unsigned int log_errors:1;
-       unsigned int marked:1;
-       unsigned int zs_closed:1;
+       bool log_errors:1;
+       bool marked:1;
+       bool zs_closed:1;
 };
 
 static void i_stream_bzlib_close(struct iostream_private *stream,
index 2f169fbbb57e21ec707108bd38dd3c9ae2da2c2f..e4ac44a85b15244dd20d03f10d13c193714cc731 100644 (file)
@@ -19,9 +19,9 @@ struct lz4_istream {
        buffer_t *chunk_buf;
        uint32_t chunk_size, chunk_left, max_uncompressed_chunk_size;
 
-       unsigned int log_errors:1;
-       unsigned int marked:1;
-       unsigned int header_read:1;
+       bool log_errors:1;
+       bool marked:1;
+       bool header_read:1;
 };
 
 static void i_stream_lz4_close(struct iostream_private *stream,
index 749858bcd6cd6f1d302968efa596f48861ab5566..5cc21c68d115411311a3b46acc92615276b14388 100644 (file)
@@ -20,9 +20,9 @@ struct lzma_istream {
        size_t high_pos;
        struct stat last_parent_statbuf;
 
-       unsigned int log_errors:1;
-       unsigned int marked:1;
-       unsigned int strm_closed:1;
+       bool log_errors:1;
+       bool marked:1;
+       bool strm_closed:1;
 };
 
 static void i_stream_lzma_close(struct iostream_private *stream,
index dca544164cf0b77095c40912b6300c42f5319191..8e2d748d9df357dd855538580064d25d66b39504 100644 (file)
@@ -30,12 +30,12 @@ struct zlib_istream {
        uint32_t crc32;
        struct stat last_parent_statbuf;
 
-       unsigned int gz:1;
-       unsigned int log_errors:1;
-       unsigned int marked:1;
-       unsigned int header_read:1;
-       unsigned int trailer_read:1;
-       unsigned int zs_closed:1;
+       bool gz:1;
+       bool log_errors:1;
+       bool marked:1;
+       bool header_read:1;
+       bool trailer_read:1;
+       bool zs_closed:1;
 };
 
 static void i_stream_zlib_init(struct zlib_istream *zstream);
index ed6e797f890a9eefbf06983639dd7372cf023842..8f11a6aaa57d2f72b2cccade07da61a72a2f65d2 100644 (file)
@@ -17,7 +17,7 @@ struct bzlib_ostream {
        char outbuf[CHUNK_SIZE];
        unsigned int outbuf_offset, outbuf_used;
 
-       unsigned int flushed:1;
+       bool flushed:1;
 };
 
 static void o_stream_bzlib_close(struct iostream_private *stream,
index 5000d5da69a10ff40468e76c2b409cc17591b3fa..9f25af5e20c760238c93cfd3e77401cf6dc11a59 100644 (file)
@@ -17,7 +17,7 @@ struct lzma_ostream {
        unsigned char outbuf[CHUNK_SIZE];
        unsigned int outbuf_offset, outbuf_used;
 
-       unsigned int flushed:1;
+       bool flushed:1;
 };
 
 static void o_stream_lzma_close(struct iostream_private *stream,
index d043e4bdbfff1fff4bdf689dcb0704dcef9c5f04..3c3ded2dafb4a20d98c3946ebbb188b0a2e6aee0 100644 (file)
@@ -22,9 +22,9 @@ struct zlib_ostream {
 
        uint32_t crc, bytes32;
 
-       unsigned int gz:1;
-       unsigned int header_sent:1;
-       unsigned int flushed:1;
+       bool gz:1;
+       bool header_sent:1;
+       bool flushed:1;
 };
 
 static void o_stream_zlib_close(struct iostream_private *stream,
index 8b5fadc7e8d84da91517a609e0b35275ce3ffac9..b62beb14ade32941cd74ae43ffcd0b1b5469e16e 100644 (file)
@@ -50,8 +50,8 @@ struct client_dict {
        unsigned int async_commits;
        unsigned int iter_replies_skip;
 
-       unsigned int in_iteration:1;
-       unsigned int handshaked:1;
+       bool in_iteration:1;
+       bool handshaked:1;
 };
 
 struct client_dict_iterate_context {
@@ -75,9 +75,9 @@ struct client_dict_transaction_context {
        unsigned int id;
        unsigned int connect_counter;
 
-       unsigned int sent_begin:1;
-       unsigned int async:1;
-       unsigned int committed:1;
+       bool sent_begin:1;
+       bool async:1;
+       bool committed:1;
 };
 
 static int client_dict_connect(struct client_dict *dict, const char **error_r);
index 049588d4da80b467bcdbe213f60efd4ad97d7597..3c487eeb5025abcd5c52f93c3ece3a1703542fdd 100644 (file)
@@ -53,13 +53,13 @@ struct dict_iterate_context {
        dict_iterate_callback_t *async_callback;
        void *async_context;
 
-       unsigned int has_more:1;
+       bool has_more:1;
 };
 
 struct dict_transaction_context {
        struct dict *dict;
 
-       unsigned int changed:1;
+       bool changed:1;
 };
 
 extern struct dict dict_driver_client;
index e1aafe501028ed978e1fcaeba5b2d4d665c7fe7c..84d1a2345216b80fec410606194f5a030bb7b1d3 100644 (file)
@@ -30,7 +30,7 @@ struct sql_dict {
        const char *username;
        const struct dict_sql_settings *set;
 
-       unsigned int has_on_duplicate_key:1;
+       bool has_on_duplicate_key:1;
 };
 
 struct sql_dict_iterate_context {
index 8889e6fd3a5a35075780140c34feecdc08518dfd..c98b4b2bae5a4a084f64989d7dc2759399b9da2f 100644 (file)
@@ -116,14 +116,14 @@ struct fs_file {
 
        struct timeval timing_start[FS_OP_COUNT];
 
-       unsigned int write_pending:1;
-       unsigned int writing_stream:1;
-       unsigned int metadata_changed:1;
-
-       unsigned int read_or_prefetch_counted:1;
-       unsigned int lookup_metadata_counted:1;
-       unsigned int stat_counted:1;
-       unsigned int istream_open:1;
+       bool write_pending:1;
+       bool writing_stream:1;
+       bool metadata_changed:1;
+
+       bool read_or_prefetch_counted:1;
+       bool lookup_metadata_counted:1;
+       bool stat_counted:1;
+       bool istream_open:1;
 };
 
 struct fs_lock {
index aa0ba486bb3f62b5dd75a3d7c15227a493ede945..f658ed314ad1c318eb018b82e905d74c4d9cdd86 100644 (file)
@@ -117,25 +117,25 @@ struct http_client_request {
 
        enum http_request_state state;
 
-       unsigned int have_hdr_authorization:1;
-       unsigned int have_hdr_body_spec:1;
-       unsigned int have_hdr_connection:1;
-       unsigned int have_hdr_date:1;
-       unsigned int have_hdr_expect:1;
-       unsigned int have_hdr_host:1;
-       unsigned int have_hdr_user_agent:1;
-
-       unsigned int payload_sync:1;
-       unsigned int payload_sync_continue:1;
-       unsigned int payload_chunked:1;
-       unsigned int payload_wait:1;
-       unsigned int urgent:1;
-       unsigned int submitted:1;
-       unsigned int listed:1;
-       unsigned int connect_tunnel:1;
-       unsigned int connect_direct:1;
-       unsigned int ssl_tunnel:1;
-       unsigned int preserve_exact_reason:1;
+       bool have_hdr_authorization:1;
+       bool have_hdr_body_spec:1;
+       bool have_hdr_connection:1;
+       bool have_hdr_date:1;
+       bool have_hdr_expect:1;
+       bool have_hdr_host:1;
+       bool have_hdr_user_agent:1;
+
+       bool payload_sync:1;
+       bool payload_sync_continue:1;
+       bool payload_chunked:1;
+       bool payload_wait:1;
+       bool urgent:1;
+       bool submitted:1;
+       bool listed:1;
+       bool connect_tunnel:1;
+       bool connect_direct:1;
+       bool ssl_tunnel:1;
+       bool preserve_exact_reason:1;
 };
 
 struct http_client_connection {
@@ -165,17 +165,17 @@ struct http_client_connection {
        /* requests that have been sent, waiting for response */
        ARRAY_TYPE(http_client_request) request_wait_list;
 
-       unsigned int connected:1;           /* connection is connected */
-       unsigned int tunneling:1;          /* last sent request turns this
+       bool connected:1;           /* connection is connected */
+       bool tunneling:1;          /* last sent request turns this
                                              connection into tunnel */
-       unsigned int connect_initialized:1; /* connection was initialized */
-       unsigned int connect_succeeded:1;
-       unsigned int closing:1;
-       unsigned int disconnected:1;
-       unsigned int close_indicated:1;
-       unsigned int output_locked:1;       /* output is locked; no pipelining */
-       unsigned int output_broken:1;       /* output is broken; no more requests */
-       unsigned int in_req_callback:1;  /* performin request callback (busy) */
+       bool connect_initialized:1; /* connection was initialized */
+       bool connect_succeeded:1;
+       bool closing:1;
+       bool disconnected:1;
+       bool close_indicated:1;
+       bool output_locked:1;       /* output is locked; no pipelining */
+       bool output_broken:1;       /* output is broken; no more requests */
+       bool in_req_callback:1;  /* performin request callback (busy) */
 };
 
 struct http_client_peer {
@@ -202,12 +202,12 @@ struct http_client_peer {
        struct timeout *to_backoff;
        unsigned int backoff_time_msecs;
 
-       unsigned int disconnected:1;     /* peer is already disconnected */
-       unsigned int no_payload_sync:1;  /* expect: 100-continue failed before */
-       unsigned int seen_100_response:1;/* expect: 100-continue succeeded before */
-       unsigned int allows_pipelining:1;/* peer is known to allow persistent
+       bool disconnected:1;     /* peer is already disconnected */
+       bool no_payload_sync:1;  /* expect: 100-continue failed before */
+       bool seen_100_response:1;/* expect: 100-continue succeeded before */
+       bool allows_pipelining:1;/* peer is known to allow persistent
                                             connections */
-       unsigned int handling_requests:1;/* currently running request handler */
+       bool handling_requests:1;/* currently running request handler */
 };
 
 struct http_client_queue {
@@ -261,7 +261,7 @@ struct http_client_host {
        /* active DNS lookup */
        struct dns_lookup *dns_lookup;
 
-       unsigned int unix_local:1;
+       bool unix_local:1;
 };
 
 struct http_client {
index 0c1a9cda6371803d220e6a1dda0df0086b399a53..080069b5757499d1612be4ea3dc8e888f622bbee 100644 (file)
@@ -37,7 +37,7 @@ struct http_header_parser {
 
        enum http_header_parse_state state;
 
-       unsigned int lenient:1;
+       bool lenient:1;
 };
 
 struct http_header_parser *
index f9b39ef41479b82e88b7cbc9f3545d4775b74bfa..418b4f0b670e3889383c5088cf36f447345db5cc 100644 (file)
@@ -31,8 +31,8 @@ struct http_message {
        ARRAY_TYPE(http_transfer_coding) transfer_encoding;
        ARRAY_TYPE(const_string) connection_options;
 
-       unsigned int connection_close:1;
-       unsigned int have_content_length:1;
+       bool connection_close:1;
+       bool have_content_length:1;
 };
 
 struct http_message_parser {
@@ -52,7 +52,7 @@ struct http_message_parser {
        pool_t msg_pool;
        struct http_message msg;
 
-       unsigned int lenient:1;
+       bool lenient:1;
 };
 
 void http_message_parser_init(struct http_message_parser *parser,
index 706834ca9c787675759d954108fc01d74b0df09c..b5a21fd252c0a3e06f671ea6f1affc5ca58b1ae2 100644 (file)
@@ -33,7 +33,7 @@ struct http_request_parser {
        const char *request_method;
        const char *request_target;
 
-       unsigned int skipping_line:1;
+       bool skipping_line:1;
 };
 
 struct http_request_parser *
index b162ad5c5b849fd38ee15d23f9a5f2528f6d75b3..feee28fba1e4771eb761c390affc6126499ed8d9 100644 (file)
@@ -45,8 +45,8 @@ struct http_request {
 
        ARRAY_TYPE(const_string) connection_options;
 
-       unsigned int connection_close:1;
-       unsigned int expect_100_continue:1;
+       bool connection_close:1;
+       bool expect_100_continue:1;
 };
 
 static inline bool
index dde386efe4fbf148143b40658ad2b0229db24fc6..ccd8e6f9d6779da7fa33d86d1dc80440c98f05db 100644 (file)
@@ -31,7 +31,7 @@ struct http_response {
 
        ARRAY_TYPE(const_string) connection_options;
 
-       unsigned int connection_close:1;
+       bool connection_close:1;
 };
 
 void
index b0a512898bfeb7da4f611ea0331c101c575e5d3f..31b54f820ed52817b612fdebd64427431c6e7a80 100644 (file)
@@ -58,16 +58,16 @@ struct http_server_response {
        http_server_tunnel_callback_t tunnel_callback;
        void *tunnel_context;
 
-       unsigned int have_hdr_connection:1;
-       unsigned int have_hdr_date:1;
-       unsigned int have_hdr_body_spec:1;
-
-       unsigned int payload_chunked:1;
-       unsigned int payload_blocking:1;
-       unsigned int payload_direct:1;
-       unsigned int payload_corked:1;
-       unsigned int close:1;
-       unsigned int submitted:1;
+       bool have_hdr_connection:1;
+       bool have_hdr_date:1;
+       bool have_hdr_body_spec:1;
+
+       bool payload_chunked:1;
+       bool payload_blocking:1;
+       bool payload_direct:1;
+       bool payload_corked:1;
+       bool close:1;
+       bool submitted:1;
 };
 
 struct http_server_request {
@@ -90,11 +90,11 @@ struct http_server_request {
        void (*destroy_callback)(void *);
        void *destroy_context;
 
-       unsigned int payload_halted:1;
-       unsigned int sent_100_continue:1;
-       unsigned int delay_destroy:1;
-       unsigned int destroy_pending:1;
-       unsigned int failed:1;
+       bool payload_halted:1;
+       bool sent_100_continue:1;
+       bool delay_destroy:1;
+       bool destroy_pending:1;
+       bool failed:1;
 };
 
 struct http_server_connection {
@@ -121,13 +121,13 @@ struct http_server_connection {
 
        struct http_server_stats stats;
 
-       unsigned int ssl:1;
-       unsigned int closed:1;
-       unsigned int close_indicated:1;
-       unsigned int input_broken:1;
-       unsigned int output_locked:1;
-       unsigned int in_req_callback:1;  /* performing request callback (busy) */
-       unsigned int switching_ioloop:1; /* in the middle of switching ioloop */
+       bool ssl:1;
+       bool closed:1;
+       bool close_indicated:1;
+       bool input_broken:1;
+       bool output_locked:1;
+       bool in_req_callback:1;  /* performing request callback (busy) */
+       bool switching_ioloop:1; /* in the middle of switching ioloop */
 };
 
 struct http_server {
@@ -140,7 +140,7 @@ struct http_server {
 
        struct connection_list *conn_list;
 
-       unsigned int shutting_down:1;    /* shutting down server */
+       bool shutting_down:1;    /* shutting down server */
 };
 
 static inline const char *
index ac738749ea0bc090e388803c876d23852850ccbd..b092a8921155c94c3fb452d2b1570d4cb620a26c 100644 (file)
@@ -47,7 +47,7 @@ struct http_transfer_chunked_istream {
 
        struct http_header_parser *header_parser;
 
-       unsigned int finished:1;
+       bool finished:1;
 };
 
 /* Chunk parser */
@@ -533,7 +533,7 @@ struct http_transfer_chunked_ostream {
 
        size_t chunk_size, chunk_pos;
 
-       unsigned int chunk_active:1;
+       bool chunk_active:1;
 };
 
 static size_t _log16(size_t in)
index df7a209ba6b3801dacbf63dcdfa40c3112f3d32d..ffac19d7dfef4a5c773556b727399778266d5325 100644 (file)
@@ -23,8 +23,8 @@ struct http_url_parser {
 
        enum http_request_target_format req_format;
 
-       unsigned int relative:1;
-       unsigned int request_target:1;
+       bool relative:1;
+       bool request_target:1;
 };
 
 static bool http_url_parse_authority(struct http_url_parser *url_parser)
index 6d3863ac150a5032b4114a43845a1151e17b0731..4472fe3ae0fa217b375cf73c6b2e800a2d336539 100644 (file)
@@ -24,7 +24,7 @@ struct http_url {
        /* #fragment (still encoded) */
        const char *enc_fragment;
 
-       unsigned int have_ssl:1;
+       bool have_ssl:1;
 };
 
 /*
index b4f90bc80bf1b33b4651b2ec0609a67e2500af7f..a6bc16eea328792e56f63542ad5f15a2467f9311 100644 (file)
@@ -57,11 +57,11 @@ struct imapc_command {
        void *context;
 
        /* This is the AUTHENTICATE command */
-       unsigned int authenticate:1;
+       bool authenticate:1;
        /* This is the IDLE command */
-       unsigned int idle:1;
+       bool idle:1;
        /* Waiting for '+' literal reply before we can continue */
-       unsigned int wait_for_literal:1;
+       bool wait_for_literal:1;
 };
 ARRAY_DEFINE_TYPE(imapc_command, struct imapc_command *);
 
@@ -125,10 +125,10 @@ struct imapc_connection {
        struct timeval throttle_end_timeval;
        struct timeout *to_throttle, *to_throttle_shrink;
 
-       unsigned int reconnecting:1;
-       unsigned int idling:1;
-       unsigned int idle_stopping:1;
-       unsigned int idle_plus_waiting:1;
+       bool reconnecting:1;
+       bool idling:1;
+       bool idle_stopping:1;
+       bool idle_plus_waiting:1;
 };
 
 static void imapc_connection_capability_cb(const struct imapc_command_reply *reply,
index 15330f9b362207e1eeb5ace497c47ec61e5b0474..3bd3642b793888c0055af9b32b2e255c94022b04 100644 (file)
@@ -12,7 +12,7 @@ struct imap_metadata_transaction {
        enum mail_error error;
        char *error_string;
 
-       unsigned int server:1;
+       bool server:1;
 };
 
 bool imap_metadata_verify_entry_name(const char *name, const char **error_r)
index 5afb15c38e7929625c7b06d98435b78605f2b040..9d2ccf4e44553ebef5a2503ad378b4dac754cc58 100644 (file)
@@ -27,7 +27,7 @@ struct imap_msgpart_url {
        
        struct imap_msgpart_open_result result;
 
-       unsigned int decode_cte_to_binary:1;
+       bool decode_cte_to_binary:1;
 };
 
 int imap_msgpart_url_create(struct mail_user *user, const struct imap_url *url,
index 0e8428ccb815d37d086ee4704a66783c4f301ed3..08f78254ce1905a235309de516852a457429f1d9 100644 (file)
@@ -44,7 +44,7 @@ struct imap_msgpart {
        /* which part of the message part to fetch (default: 0..(uoff_t)-1) */
        uoff_t partial_offset, partial_size;
 
-       unsigned int decode_cte_to_binary:1;
+       bool decode_cte_to_binary:1;
 };
 
 struct imap_msgpart_open_ctx {
index 6ab16e97003683e1508a94caefc86be1fd1bb059..d350998838617ce3a387e057bd10e38da89a143c 100644 (file)
@@ -79,7 +79,7 @@ struct imap_urlauth_connection {
        /* userid => target struct */
        struct imap_urlauth_target *targets_head, *targets_tail;
 
-       unsigned int reading_literal:1;
+       bool reading_literal:1;
 };
 
 #define IMAP_URLAUTH_RECONNECT_MIN_SECS 2
index c72cbfcbdc3e5304195cb14c43a9ef13f599c209..736be82c17d2fefba66e6b718480314459776f04 100644 (file)
@@ -44,13 +44,13 @@ struct imap_urlauth_fetch {
                char *bodypartstruct;
                char *error;
 
-               unsigned int succeeded:1;
-               unsigned int binary_has_nuls:1;
+               bool succeeded:1;
+               bool binary_has_nuls:1;
        } pending_reply;
 
-       unsigned int failed:1;
-       unsigned int waiting_local:1;
-       unsigned int waiting_service:1;
+       bool failed:1;
+       bool waiting_local:1;
+       bool waiting_service:1;
 };
 
 static void imap_urlauth_fetch_abort_local(struct imap_urlauth_fetch *ufetch)
index 116a477fcf8d67dd4c1151d41fffe5806ff2fffc..628a95ec2cef4670be072b93a902049525c4adf4 100644 (file)
@@ -26,8 +26,8 @@ struct imap_urlauth_fetch_reply {
        const char *bodypartstruct;
        const char *error;
 
-       unsigned int succeeded:1;
-       unsigned int binary_has_nuls:1;
+       bool succeeded:1;
+       bool binary_has_nuls:1;
 };
 
 /* Callback to handle fetch reply. Returns 1 if handled completely and ready
index 4e392c5489d60fc8b5bf3aebf2117349bd57c34a..3dcf798e9ec2a0f859a34d94549ee1a783d5b7d7 100644 (file)
@@ -13,7 +13,7 @@ struct imap_urlauth_context {
        char *access_user;
        const char **access_applications;
 
-       unsigned int access_anonymous:1;
+       bool access_anonymous:1;
 };
 
 #endif
index 870d4ccf82790ec7225008c283424b2ad149205e..d55ee154f0c4fe5e739dd51ea60b4213585fca2e 100644 (file)
@@ -57,7 +57,7 @@ struct imap_arg {
                uoff_t literal_size;
                ARRAY_TYPE(imap_arg_list) list;
        } _data;
-       unsigned int literal8:1; /* BINARY literal8 used */
+       bool literal8:1; /* BINARY literal8 used */
 };
 
 /* RFC 3501's astring type. Note that this doesn't return TRUE for
index a901cb2fb92c973cce8d9ebc37191905169aba5d..8715e310ee47db3efb97535a0f5f0ade5986b6fc 100644 (file)
@@ -57,14 +57,14 @@ struct imap_parser {
        enum imap_parser_error error;
        const char *error_msg;
 
-       unsigned int literal_minus:1;
-       unsigned int literal_skip_crlf:1;
-       unsigned int literal_nonsync:1;
-       unsigned int literal8:1;
-       unsigned int literal_size_return:1;
-       unsigned int eol:1;
-       unsigned int args_added_extra_eol:1;
-       unsigned int fatal_error:1;
+       bool literal_minus:1;
+       bool literal_skip_crlf:1;
+       bool literal_nonsync:1;
+       bool literal8:1;
+       bool literal_size_return:1;
+       bool eol:1;
+       bool args_added_extra_eol:1;
+       bool fatal_error:1;
 };
 
 struct imap_parser *
index 6ce2318e05f43880021dbf7d5831d1c1e89796d6..344cecd441e0e7b29715591c8be13f76c19c5950 100644 (file)
@@ -121,7 +121,7 @@ struct imap_url_parser {
        struct imap_url *url;
        const struct imap_url *base;
 
-       unsigned int relative:1;
+       bool relative:1;
 };
 
 static int
index d62bc7b9fe868a6bfe4d2255b7d355f6bb1b71fb..9f0b2aa6d48a25a8a792c4a644167ef9657081f5 100644 (file)
@@ -34,7 +34,7 @@ struct imap_url {
        size_t uauth_token_size;
        time_t uauth_expire; /* (time_t)-1 if not set */
 
-       unsigned int have_partial:1;
+       bool have_partial:1;
 };
 
 /*
index 22576cbf54ee961d879b08f3320281ef8477f65c..cfa74af646352a7e30d93f391cc5e94da47c8753 100644 (file)
@@ -99,9 +99,9 @@ struct mail_cache_field_private {
        uint32_t uid_highwater;
 
        /* Unused fields aren't written to cache file */
-       unsigned int used:1;
-       unsigned int adding:1;
-       unsigned int decision_dirty:1;
+       bool used:1;
+       bool adding:1;
+       bool decision_dirty:1;
 };
 
 struct mail_cache {
@@ -152,13 +152,13 @@ struct mail_cache {
        unsigned int *file_field_map;
        unsigned int file_fields_count;
 
-       unsigned int opened:1;
-       unsigned int locked:1;
-       unsigned int last_lock_failed:1;
-       unsigned int hdr_modified:1;
-       unsigned int field_header_write_pending:1;
-       unsigned int compressing:1;
-       unsigned int map_with_read:1;
+       bool opened:1;
+       bool locked:1;
+       bool last_lock_failed:1;
+       bool hdr_modified:1;
+       bool field_header_write_pending:1;
+       bool compressing:1;
+       bool map_with_read:1;
 };
 
 struct mail_cache_loop_track {
@@ -183,7 +183,7 @@ struct mail_cache_view {
        uint8_t cached_exists_value;
        uint32_t cached_exists_seq;
 
-       unsigned int no_decision_updates:1;
+       bool no_decision_updates:1;
 };
 
 struct mail_cache_iterate_field {
@@ -204,10 +204,10 @@ struct mail_cache_lookup_iterate_ctx {
 
        unsigned int trans_next_idx;
 
-       unsigned int stop:1;
-       unsigned int failed:1;
-       unsigned int memory_appends_checked:1;
-       unsigned int disk_appends_checked:1;
+       bool stop:1;
+       bool failed:1;
+       bool memory_appends_checked:1;
+       bool disk_appends_checked:1;
 };
 
 /* Explicitly lock the cache file. Returns -1 if error / timed out,
index bbd7e9bcb95190c2273ebd51a5ffc72c84fda5da..75eb0f4c1c4195200119ccb057abf5b61de44139 100644 (file)
@@ -44,8 +44,8 @@ struct mail_cache_transaction_ctx {
 
        unsigned int records_written;
 
-       unsigned int tried_compression:1;
-       unsigned int changes:1;
+       bool tried_compression:1;
+       bool changes:1;
 };
 
 static MODULE_CONTEXT_DEFINE_INIT(cache_mail_index_transaction_module,
index 6cfd83db752aaefcda765ba667ea392aa760c156..b2e219bb55db7a7fefd024a1a114ddec4938fd9f 100644 (file)
@@ -114,7 +114,7 @@ struct mail_index_registered_ext {
        mail_index_expunge_handler_t *expunge_handler;
 
        void *expunge_context;
-       unsigned int expunge_handler_call_always:1;
+       bool expunge_handler_call_always:1;
 };
 
 struct mail_index_record_map {
@@ -215,21 +215,21 @@ struct mail_index {
        ARRAY(union mail_index_module_context *) module_contexts;
 
        char *error;
-       unsigned int nodiskspace:1;
-       unsigned int index_lock_timeout:1;
-
-       unsigned int index_delete_requested:1; /* next sync sets it deleted */
-       unsigned int index_deleted:1; /* no changes allowed anymore */
-       unsigned int log_sync_locked:1;
-       unsigned int readonly:1;
-       unsigned int mapping:1;
-       unsigned int syncing:1;
-       unsigned int need_recreate:1;
-       unsigned int index_min_write:1;
-       unsigned int modseqs_enabled:1;
-       unsigned int initial_create:1;
-       unsigned int initial_mapped:1;
-       unsigned int fscked:1;
+       bool nodiskspace:1;
+       bool index_lock_timeout:1;
+
+       bool index_delete_requested:1; /* next sync sets it deleted */
+       bool index_deleted:1; /* no changes allowed anymore */
+       bool log_sync_locked:1;
+       bool readonly:1;
+       bool mapping:1;
+       bool syncing:1;
+       bool need_recreate:1;
+       bool index_min_write:1;
+       bool modseqs_enabled:1;
+       bool initial_create:1;
+       bool initial_mapped:1;
+       bool fscked:1;
 };
 
 extern struct mail_index_module_register mail_index_module_register;
index 4382d75a93de241eb98b915df1e96ace339fe985..672aba9ee13fc003db117bec84957ae4382b01e0 100644 (file)
@@ -48,7 +48,7 @@ struct mail_index_strmap_view {
        uint32_t next_str_idx;
        uint32_t lost_expunged_uid;
 
-       unsigned int desynced:1;
+       bool desynced:1;
 };
 
 struct mail_index_strmap_read_context {
@@ -65,7 +65,7 @@ struct mail_index_strmap_read_context {
        uint32_t next_ref_index;
        unsigned int rec_size;
 
-       unsigned int too_large_uids:1;
+       bool too_large_uids:1;
 };
 
 struct mail_index_strmap_view_sync {
index 5ef8293208faeb3def548fe943643cdda1862da3..efce109fdfb574ac05e7fb3f14f9d5363861c182 100644 (file)
@@ -13,7 +13,7 @@ struct mail_index_sync_list {
        const ARRAY_TYPE(uid_range) *array;
        unsigned int idx;
        unsigned int keyword_idx:31;
-       unsigned int keyword_remove:1;
+       bool keyword_remove:1;
 };
 
 struct mail_index_expunge_handler {
@@ -37,12 +37,12 @@ struct mail_index_sync_map_ctx {
 
         enum mail_index_sync_handler_type type;
 
-       unsigned int sync_handlers_initialized:1;
-       unsigned int expunge_handlers_set:1;
-       unsigned int expunge_handlers_used:1;
-       unsigned int cur_ext_ignore:1;
-       unsigned int internal_update:1; /* used by keywords for ext_intro */
-       unsigned int errors:1;
+       bool sync_handlers_initialized:1;
+       bool expunge_handlers_set:1;
+       bool expunge_handlers_used:1;
+       bool cur_ext_ignore:1;
+       bool internal_update:1; /* used by keywords for ext_intro */
+       bool errors:1;
 };
 
 extern struct mail_transaction_map_functions mail_index_map_sync_funcs;
index 34a9c78c6b8441f4d4a99f6469ee4bbe5046d4d1..a7a2662610c1d1c08cbc24447a384c95302e2326 100644 (file)
@@ -24,8 +24,8 @@ struct mail_index_sync_ctx {
        ARRAY(struct mail_index_sync_list) sync_list;
        uint32_t next_uid;
 
-       unsigned int no_warning:1;
-       unsigned int seen_nonexternal_transactions:1;
+       bool no_warning:1;
+       bool seen_nonexternal_transactions:1;
 };
 
 static void mail_index_sync_add_expunge(struct mail_index_sync_ctx *ctx)
index 8b51e7f6557420d841abbce3d32e129f9873da74..664c850f78c6e155ba0664ff1dd543f8ce3a8060 100644 (file)
@@ -81,25 +81,25 @@ struct mail_index_transaction {
        /* Module-specific contexts. */
        ARRAY(union mail_index_transaction_module_context *) module_contexts;
 
-       unsigned int no_appends:1;
-
-       unsigned int sync_transaction:1;
-       unsigned int appends_nonsorted:1;
-       unsigned int expunges_nonsorted:1;
-       unsigned int drop_unnecessary_flag_updates:1;
-       unsigned int pre_hdr_changed:1;
-       unsigned int post_hdr_changed:1;
-       unsigned int reset:1;
-       unsigned int index_deleted:1;
-       unsigned int index_undeleted:1;
-       unsigned int commit_deleted_index:1;
-       unsigned int tail_offset_changed:1;
+       bool no_appends:1;
+
+       bool sync_transaction:1;
+       bool appends_nonsorted:1;
+       bool expunges_nonsorted:1;
+       bool drop_unnecessary_flag_updates:1;
+       bool pre_hdr_changed:1;
+       bool post_hdr_changed:1;
+       bool reset:1;
+       bool index_deleted:1;
+       bool index_undeleted:1;
+       bool commit_deleted_index:1;
+       bool tail_offset_changed:1;
        /* non-extension updates. flag updates don't change this because
           they may be added and removed, so be sure to check that the updates
           array is non-empty also. */
-       unsigned int log_updates:1;
+       bool log_updates:1;
        /* extension updates */
-       unsigned int log_ext_updates:1;
+       bool log_ext_updates:1;
 };
 
 #define MAIL_INDEX_TRANSACTION_HAS_CHANGES(t) \
index 3c323fde81676b2c52104ca2314fac9be5fb11f2..e291fae1a5aedb712690a33a2a4e9cedda12376c 100644 (file)
@@ -73,11 +73,11 @@ struct mail_index_view {
        struct mail_index_transaction *transactions_list;
        int transactions;
 
-       unsigned int inconsistent:1;
+       bool inconsistent:1;
        /* this view was created by mail_index_sync_begin() */
-       unsigned int index_sync_view:1;
+       bool index_sync_view:1;
        /* this view is being synced */
-       unsigned int syncing:1;
+       bool syncing:1;
 };
 
 struct mail_index_view *
index d7c664ef3b1cd4bc8cd1a0a53825f2327a5704c9..57214a20541c1788228350dbc03f9d79767eb8ed 100644 (file)
@@ -32,12 +32,12 @@ struct mail_index_view_sync_ctx {
        unsigned int lost_flag_idx;
 
        size_t data_offset;
-       unsigned int failed:1;
-       unsigned int sync_map_update:1;
-       unsigned int skipped_expunges:1;
-       unsigned int last_read:1;
-       unsigned int log_was_lost:1;
-       unsigned int hidden:1;
+       bool failed:1;
+       bool sync_map_update:1;
+       bool skipped_expunges:1;
+       bool last_read:1;
+       bool log_was_lost:1;
+       bool hidden:1;
 };
 
 static int
index bf4620db0ee782f602a89f5ff3d7137c43137cf7..12ae8adf143e5d99c0aa3bc21bed6aab9f6c950d 100644 (file)
@@ -208,7 +208,7 @@ struct mail_index_view_sync_rec {
        enum mail_index_view_sync_type type;
 
        /* TRUE if this was a hidden transaction. */
-       unsigned int hidden:1;
+       bool hidden:1;
 };
 
 struct mail_index_transaction_commit_result {
index a0e0c8c988033a9743f54a7c73fdeee173c589d2..769b8f1d6529d17d1c81801b0fe4c040c1e04862 100644 (file)
@@ -76,9 +76,9 @@ struct mail_transaction_log_file {
        struct file_lock *file_lock;
        time_t lock_created;
 
-       unsigned int locked:1;
-       unsigned int locked_sync_offset_updated:1;
-       unsigned int corrupted:1;
+       bool locked:1;
+       bool locked_sync_offset_updated:1;
+       bool corrupted:1;
 };
 
 struct mail_transaction_log {
@@ -97,8 +97,8 @@ struct mail_transaction_log {
        unsigned int dotlock_count;
        struct dotlock *dotlock;
 
-       unsigned int nfs_flush:1;
-       unsigned int log_2_unlink_checked:1;
+       bool nfs_flush:1;
+       bool log_2_unlink_checked:1;
 };
 
 void
index b35d25adceebb159f88191e4454bb112308b29af..e7396099039fbc10a6a337cc99b5377be21026ad 100644 (file)
@@ -27,7 +27,7 @@ struct mail_transaction_log_view {
        uoff_t mark_offset, mark_next_offset;
        uint64_t mark_modseq;
 
-       unsigned int broken:1;
+       bool broken:1;
 };
 
 #endif
index f1e997309b05ac07302f07304dd2f84778bc7a01..b12bb6fceb0c2c4eab57dd8d454e8d1427b571e9 100644 (file)
@@ -177,11 +177,11 @@ struct mail_transaction_log_append_ctx {
        unsigned int transaction_count;
 
        /* same as mail_index_transaction->sync_transaction */
-       unsigned int index_sync_transaction:1;
+       bool index_sync_transaction:1;
        /* same as mail_index_transaction->tail_offset_changed */
-       unsigned int tail_offset_changed:1;
-       unsigned int sync_includes_this:1;
-       unsigned int want_fsync:1;
+       bool tail_offset_changed:1;
+       bool sync_includes_this:1;
+       bool want_fsync:1;
 };
 
 #define LOG_IS_BEFORE(seq1, offset1, seq2, offset2) \
index 66751112f094451e6db60b64f13406296bb0c842..bc806ba668245aaf6b972a8fea16651c53e390df 100644 (file)
@@ -44,7 +44,7 @@ struct duplicate_file {
 
        int new_fd;
        struct dotlock *dotlock;
-       unsigned int changed:1;
+       bool changed:1;
 };
 
 struct duplicate_context {
index 5b882cac90aec7b9efd49fafc416080335aadfe2..5cf53fa3c80d4126184c7cab1fa2d0b8d0dbde7b 100644 (file)
@@ -33,8 +33,8 @@ struct lmtp_rcpt {
 
        struct lmtp_recipient_params params;
 
-       unsigned int data_called:1;
-       unsigned int failed:1;
+       bool data_called:1;
+       bool failed:1;
 };
 
 struct lmtp_client {
@@ -73,12 +73,12 @@ struct lmtp_client {
        unsigned char output_last;
        struct lmtp_client_times times;
 
-       unsigned int running:1;
-       unsigned int xclient_sent:1;
-       unsigned int rcpt_to_successes:1;
-       unsigned int output_finished:1;
-       unsigned int finish_called:1;
-       unsigned int global_remote_failure:1;
+       bool running:1;
+       bool xclient_sent:1;
+       bool rcpt_to_successes:1;
+       bool output_finished:1;
+       bool finish_called:1;
+       bool global_remote_failure:1;
 };
 
 static void lmtp_client_send_rcpts(struct lmtp_client *client);
index 978380d2a51a00df678a27d6ffe774bce9dca8fa..66b0684a6db49427c9e32c36f481cceac931c2ac 100644 (file)
@@ -24,7 +24,7 @@ struct binary_converter_istream {
 
        buffer_t *hdr_buf;
        unsigned int cte_header_len;
-       unsigned int content_type_seen:1;
+       bool content_type_seen:1;
 };
 
 static void stream_add_data(struct binary_converter_istream *bstream,
index 096f18af53e506c6cc0c6fc8cdb3e40b0ff4bc28..7341d3003a57ac274ba7fd5869f47d33e8c56d4e 100644 (file)
@@ -12,13 +12,13 @@ struct dot_istream {
        /* how far in string "\r\n.\r" are we */
        unsigned int state;
        /* state didn't actually start with \r */
-       unsigned int state_no_cr:1;
+       bool state_no_cr:1;
        /* state didn't contain \n either (only at the beginnign of stream) */
-       unsigned int state_no_lf:1;
+       bool state_no_lf:1;
        /* we've seen the "." line, keep returning EOF */
-       unsigned int dot_eof:1;
+       bool dot_eof:1;
 
-       unsigned int send_last_lf:1;
+       bool send_last_lf:1;
 };
 
 static int i_stream_dot_read_some(struct dot_istream *dstream)
index 7d30d64cf4edebdeffa2d92e21d97023504cffa4..168102c20bb5c54e804269162133ee7c4c279146 100644 (file)
@@ -27,22 +27,22 @@ struct header_filter_istream {
        unsigned int cur_line, parsed_lines;
        ARRAY(unsigned int) match_change_lines;
 
-       unsigned int header_read:1;
-       unsigned int seen_eoh:1;
-       unsigned int header_parsed:1;
-       unsigned int headers_edited:1;
-       unsigned int exclude:1;
-       unsigned int crlf:1;
-       unsigned int crlf_preserve:1;
-       unsigned int hide_body:1;
-       unsigned int add_missing_eoh:1;
-       unsigned int end_body_with_lf:1;
-       unsigned int last_lf_added:1;
-       unsigned int last_orig_crlf:1;
-       unsigned int last_added_newline:1;
-       unsigned int eoh_not_matched:1;
-       unsigned int callbacks_called:1;
-       unsigned int prev_matched:1;
+       bool header_read:1;
+       bool seen_eoh:1;
+       bool header_parsed:1;
+       bool headers_edited:1;
+       bool exclude:1;
+       bool crlf:1;
+       bool crlf_preserve:1;
+       bool hide_body:1;
+       bool add_missing_eoh:1;
+       bool end_body_with_lf:1;
+       bool last_lf_added:1;
+       bool last_orig_crlf:1;
+       bool last_added_newline:1;
+       bool eoh_not_matched:1;
+       bool callbacks_called:1;
+       bool prev_matched:1;
 };
 
 header_filter_callback *null_header_filter_callback = NULL;
index 4402f63f05d1a8f0eca49e4df71f9810d10052f5..a2185c805be9c32f71f9ed4e80bceb7c63322ea3 100644 (file)
@@ -35,7 +35,7 @@ struct message_decoder_context {
        char *content_type, *content_charset;
        enum message_cte message_cte;
 
-       unsigned int binary_input:1;
+       bool binary_input:1;
 };
 
 static void
index 381cea48303e66e6cacb172008c65dbe3394abe6..7d11154207bf634ac41fc66792a155ae9bb946b2 100644 (file)
@@ -138,7 +138,7 @@ void message_header_decode(const unsigned char *data, size_t size,
 struct decode_utf8_context {
        buffer_t *dest;
        normalizer_func_t *normalizer;
-       unsigned int changed:1;
+       bool changed:1;
 };
 
 static bool
index 665a55f7bb3613307f5ab209c8a7ad84de6366a3..ecaa43b4bded787d12382aa13d6d534e6ecb8901 100644 (file)
@@ -17,8 +17,8 @@ struct message_header_parser_ctx {
        buffer_t *value_buf;
 
        enum message_header_parser_flags flags;
-       unsigned int skip_line:1;
-       unsigned int has_nuls:1;
+       bool skip_line:1;
+       bool has_nuls:1;
 };
 
 struct message_header_parser_ctx *
index b234026a0064d3ce4bf171a6335445b5599c9736..d6863524aabf2279adc8026612754ef30d8808b0 100644 (file)
@@ -31,12 +31,12 @@ struct message_header_line {
 
        uoff_t name_offset, full_value_offset;
 
-       unsigned int continues:1; /* multiline header, continues in next line */
-       unsigned int continued:1; /* multiline header, continues */
-       unsigned int eoh:1; /* "end of headers" line */
-       unsigned int no_newline:1; /* no \n after this line */
-       unsigned int crlf_newline:1; /* newline was \r\n */
-       unsigned int use_full_value:1; /* set if you want full_value */
+       bool continues:1; /* multiline header, continues in next line */
+       bool continued:1; /* multiline header, continues */
+       bool eoh:1; /* "end of headers" line */
+       bool no_newline:1; /* no \n after this line */
+       bool crlf_newline:1; /* newline was \r\n */
+       bool use_full_value:1; /* set if you want full_value */
 };
 
 /* called once with hdr = NULL at the end of headers */
index fa2a7da02285971190d997079209fd65f4d45f6a..3ce3af2be48882a13be354c39cbd05b558d47c26 100644 (file)
@@ -19,7 +19,7 @@ struct message_boundary {
        const char *boundary;
        size_t len;
 
-       unsigned int epilogue_found:1;
+       bool epilogue_found:1;
 };
 
 struct message_parser_ctx {
@@ -44,10 +44,10 @@ struct message_parser_ctx {
        int (*parse_next_block)(struct message_parser_ctx *ctx,
                                struct message_block *block_r);
 
-       unsigned int part_seen_content_type:1;
-       unsigned int multipart:1;
-       unsigned int preparsed:1;
-       unsigned int eof:1;
+       bool part_seen_content_type:1;
+       bool multipart:1;
+       bool preparsed:1;
+       bool eof:1;
 };
 
 message_part_header_callback_t *null_message_part_header_callback = NULL;
index 001f8848204e33a0877954542a47e5de5d24665c..60cc32dc9c1dc995ec47ff27e0056ac1c37197c6 100644 (file)
@@ -18,7 +18,7 @@ struct message_search_context {
        struct message_part *prev_part;
 
        struct message_decoder_context *decoder;
-       unsigned int content_type_text:1; /* text/any or message/any */
+       bool content_type_text:1; /* text/any or message/any */
 };
 
 struct message_search_context *
index e25b9ea92b7b7cd09571c52ddcbe14ef2f2a0ff5..cc892f099554a4b04c88174cc94e6f2d058f8fb0 100644 (file)
@@ -33,7 +33,7 @@ struct ipc_server {
        struct istream *input;
        struct ostream *output;
 
-       unsigned int version_received:1;
+       bool version_received:1;
 };
 
 static void ipc_server_disconnect(struct ipc_server *server);
index de16d61de37ca8ac3ad57790ca0940b80f6e3aec..c39e7693c13cfec1082ac721b18a80e1dfa9fe4f 100644 (file)
@@ -19,8 +19,8 @@ struct master_instance_list {
 
        ARRAY(struct master_instance) instances;
 
-       unsigned int locked:1;
-       unsigned int config_paths_changed:1;
+       bool locked:1;
+       bool config_paths_changed:1;
 };
 
 struct master_instance_list_iter {
index a643e4b494318b6973e8713f5fc68ded7fd2acf1..8b40803aac0c431b5e6b9b3e2c87945f657d27eb 100644 (file)
@@ -32,7 +32,7 @@ struct master_login_auth_request {
        master_login_auth_request_callback_t *callback;
        void *context;
 
-       unsigned int aborted:1;
+       bool aborted:1;
 };
 
 struct master_login_auth {
@@ -53,9 +53,9 @@ struct master_login_auth {
 
        pid_t auth_server_pid;
 
-       unsigned int request_auth_token:1;
-       unsigned int version_received:1;
-       unsigned int spid_received:1;
+       bool request_auth_token:1;
+       bool version_received:1;
+       bool spid_received:1;
 };
 
 static void master_login_auth_set_timeout(struct master_login_auth *auth);
index 658972563f221af7705b0f551d2b973f530bbb4d..e08aa7270df39291ce18d9ef0fcfcf2e996afee4 100644 (file)
@@ -29,7 +29,7 @@ struct master_login_connection {
        struct io *io;
        struct ostream *output;
 
-       unsigned int login_success:1;
+       bool login_success:1;
 };
 
 struct master_login_postlogin {
@@ -51,7 +51,7 @@ struct master_login {
        char *postlogin_socket_path;
        unsigned int postlogin_timeout_secs;
 
-       unsigned int stopping:1;
+       bool stopping:1;
 };
 
 static void master_login_conn_close(struct master_login_connection *conn);
index 1b9014a4a336465c1f3f21833b8ffa0441edd074..89e80cba5f6e18aa2528289b2a2b9151af702d04 100644 (file)
@@ -29,7 +29,7 @@ struct master_login_settings {
        master_login_callback_t *callback;
        master_login_failure_callback_t *failure_callback;
 
-       unsigned int request_auth_token:1;
+       bool request_auth_token:1;
 };
 
 struct master_login *
index 7c9a820f1eee056553186dd95888c322fd6b9d3f..bb56568136c381ddc721da2edb0df7f0d7947a39 100644 (file)
@@ -70,17 +70,17 @@ struct master_service {
 
        struct master_service_haproxy_conn *haproxy_conns;
 
-       unsigned int killed:1;
-       unsigned int stopping:1;
-       unsigned int keep_environment:1;
-       unsigned int log_directly:1;
-       unsigned int initial_status_sent:1;
-       unsigned int die_with_master:1;
-       unsigned int call_avail_overflow:1;
-       unsigned int config_path_changed_with_param:1;
-       unsigned int want_ssl_settings:1;
-       unsigned int ssl_ctx_initialized:1;
-       unsigned int config_path_from_master:1;
+       bool killed:1;
+       bool stopping:1;
+       bool keep_environment:1;
+       bool log_directly:1;
+       bool initial_status_sent:1;
+       bool die_with_master:1;
+       bool call_avail_overflow:1;
+       bool config_path_changed_with_param:1;
+       bool want_ssl_settings:1;
+       bool ssl_ctx_initialized:1;
+       bool config_path_from_master:1;
 };
 
 void master_service_io_listeners_add(struct master_service *service);
index e3be9da50799597a6a16259a91619285f4d6b587..0d590db5fdd9f46e3937eac7616c7a76b068e1be 100644 (file)
@@ -47,9 +47,9 @@ struct master_service_settings_cache {
           (doesn't count memory used by hash table or global sets) */
        size_t cache_malloc_size;
 
-       unsigned int done_initial_lookup:1;
-       unsigned int service_uses_local:1;
-       unsigned int service_uses_remote:1;
+       bool done_initial_lookup:1;
+       bool service_uses_local:1;
+       bool service_uses_remote:1;
 };
 
 struct master_service_settings_cache *
index 3820740bb33bde8fc3a8ef9c2a0c07b9d4a1109f..b1210eda9982424f6159303f1c8145906ce9a562 100644 (file)
@@ -49,16 +49,16 @@ struct master_service_settings_output {
        /* some settings for this service (or if service was not given,
           all services) contain local/remote ip/host specific settings
           (but this lookup didn't necessarily return any of them). */
-       unsigned int service_uses_local:1;
-       unsigned int service_uses_remote:1;
+       bool service_uses_local:1;
+       bool service_uses_remote:1;
        /* returned settings contain settings specific to given
           local/remote ip/host */
-       unsigned int used_local:1;
-       unsigned int used_remote:1;
+       bool used_local:1;
+       bool used_remote:1;
        /* Config couldn't be read because we don't have enough permissions.
           The process probably should be restarted and the settings read
           before dropping privileges. */
-       unsigned int permission_denied:1;
+       bool permission_denied:1;
 };
 
 extern const struct setting_parser_info master_service_setting_parser_info;
index c08b2d725515433e9528c503de6af0141cd6c6c8..21ab957a3e9947a5b66cc49eb713aa0628191848 100644 (file)
@@ -46,10 +46,10 @@ struct master_service_connection {
        struct ip_addr real_remote_ip, real_local_ip;
        in_port_t real_remote_port, real_local_port;
 
-       unsigned int fifo:1;
-       unsigned int ssl:1;
+       bool fifo:1;
+       bool ssl:1;
 
-       unsigned int accepted:1;
+       bool accepted:1;
 };
 
 typedef void
index c128334c586c3be20e5ec82e515d49ae3d205f93..da9986b5338a578da7c925a0ee905ad2e1511db9 100644 (file)
@@ -66,12 +66,12 @@ struct service_settings {
        struct master_settings *master_set;
        enum service_type parsed_type;
        enum service_user_default user_default;
-       unsigned int login_dump_core:1;
+       bool login_dump_core:1;
 
        /* -- flags that can be set internally -- */
 
        /* process_limit must not be higher than 1 */
-       unsigned int process_limit_1:1;
+       bool process_limit_1:1;
 };
 ARRAY_DEFINE_TYPE(service_settings, struct service_settings *);
 
index 565629d539b70082bf02e5550f34bf2f5be2f2b1..ad44d766bbc4cf047ba5561fe0bda470500f1309 100644 (file)
@@ -101,8 +101,8 @@ struct cassandra_result {
        sql_query_callback_t *callback;
        void *context;
 
-       unsigned int query_sent:1;
-       unsigned int finished:1;
+       bool query_sent:1;
+       bool finished:1;
 };
 
 struct cassandra_transaction_context {
@@ -115,9 +115,9 @@ struct cassandra_transaction_context {
        pool_t query_pool;
        char *error;
 
-       unsigned int begin_succeeded:1;
-       unsigned int begin_failed:1;
-       unsigned int failed:1;
+       bool begin_succeeded:1;
+       bool begin_failed:1;
+       bool failed:1;
 };
 
 extern const struct sql_db driver_cassandra_db;
index 7d9a30d7402963a3c46ef7ff2cda6d97befac3f8..21e0f83d707bc8793b1243c07b3f3115e93006d1 100644 (file)
@@ -42,7 +42,7 @@ struct mysql_db {
        MYSQL *mysql;
        unsigned int next_query_connection;
 
-       unsigned int ssl_set:1;
+       bool ssl_set:1;
 };
 
 struct mysql_result {
@@ -63,7 +63,7 @@ struct mysql_transaction_context {
        pool_t query_pool;
        const char *error;
 
-       unsigned int failed:1;
+       bool failed:1;
 };
 
 extern const struct sql_db driver_mysql_db;
index dc13f8a93e7c11138d5485582b1f5504c343c263..abf62f0a4060c6acf9cb15970f4ef4bc42eda730 100644 (file)
@@ -35,7 +35,7 @@ struct pgsql_db {
        char *error;
        const char *connect_state;
 
-       unsigned int fatal_error:1;
+       bool fatal_error:1;
 };
 
 struct pgsql_binary_value {
@@ -58,7 +58,7 @@ struct pgsql_result {
        sql_query_callback_t *callback;
        void *context;
 
-       unsigned int timeout:1;
+       bool timeout:1;
 };
 
 struct pgsql_transaction_context {
@@ -71,7 +71,7 @@ struct pgsql_transaction_context {
        pool_t query_pool;
        const char *error;
 
-       unsigned int failed:1;
+       bool failed:1;
 };
 
 extern const struct sql_db driver_pgsql_db;
index de8ac1edddc257347cce7f72630ab513a9bdbd97..a3e16314e14f9289b84639fe57df3dc7242bac68 100644 (file)
@@ -18,7 +18,7 @@ struct sqlite_db {
        pool_t pool;
        const char *dbfile;
        sqlite3 *sqlite;
-       unsigned int connected:1;
+       bool connected:1;
        int rc;
 };
 
@@ -31,7 +31,7 @@ struct sqlite_result {
 
 struct sqlite_transaction_context {
        struct sql_transaction_context ctx;
-       unsigned int failed:1;
+       bool failed:1;
 };
 
 extern const struct sql_db driver_sqlite_db;
index ea47f5cba4176b4b9c42db811f72a35ab344b6f0..95e64c17cddf0d91d8529037829972ab0f8e1adc 100644 (file)
@@ -100,7 +100,7 @@ struct sql_db {
        unsigned int connect_failure_count;
        struct timeout *to_reconnect;
 
-       unsigned int no_reconnect:1;
+       bool no_reconnect:1;
 };
 
 struct sql_result_vfuncs {
@@ -142,9 +142,9 @@ struct sql_result {
        void *fetch_dest;
        size_t fetch_dest_size;
 
-       unsigned int failed:1;
-       unsigned int failed_try_retry:1;
-       unsigned int callback:1;
+       bool failed:1;
+       bool failed_try_retry:1;
+       bool callback:1;
 };
 
 struct sql_transaction_context {
index bbadca062776fd3d443f82cba4b3164e7e047900..07f830cc24ddceab1f95262676536b2b22debff1 100644 (file)
@@ -14,7 +14,7 @@ struct ssl_iostream_context {
        DH *dh_512, *dh_default;
        int username_nid;
 
-       unsigned int client_ctx:1;
+       bool client_ctx:1;
 };
 
 struct ssl_iostream {
@@ -42,14 +42,14 @@ struct ssl_iostream {
        ssl_iostream_handshake_callback_t *handshake_callback;
        void *handshake_context;
 
-       unsigned int handshaked:1;
-       unsigned int handshake_failed:1;
-       unsigned int cert_received:1;
-       unsigned int cert_broken:1;
-       unsigned int want_read:1;
-       unsigned int input_handler:1;
-       unsigned int ostream_flush_waiting_input:1;
-       unsigned int closed:1;
+       bool handshaked:1;
+       bool handshake_failed:1;
+       bool cert_received:1;
+       bool cert_broken:1;
+       bool want_read:1;
+       bool input_handler:1;
+       bool ostream_flush_waiting_input:1;
+       bool closed:1;
 };
 
 extern int dovecot_ssl_extdata_index;
index 67aaa06bc5b083aeca24a9d86382b75b678c3db1..dd5e5ce6c2b44e1cea4e549c4a99cd4e76ea8afd 100644 (file)
@@ -31,8 +31,8 @@ struct cydir_save_context {
        struct mail *mail;
        int fd;
 
-       unsigned int failed:1;
-       unsigned int finished:1;
+       bool failed:1;
+       bool finished:1;
 };
 
 static char *cydir_generate_tmp_filename(void)
index 107bff3d2b04b19836905e0a60ae269f76d0f77b..309c7056bf794d8f58759b1f63f4546638f6773a 100644 (file)
@@ -120,8 +120,8 @@ struct dbox_file {
        ARRAY(const char *) metadata;
        uoff_t metadata_read_offset;
 
-       unsigned int appending:1;
-       unsigned int corrupted:1;
+       bool appending:1;
+       bool corrupted:1;
 };
 
 struct dbox_file_append_context {
index 7b16d1c87ae710796739b069a45afca23d5c4154..c822f13f883b5d760ecef69045e0530b512ce01e 100644 (file)
@@ -14,10 +14,10 @@ struct dbox_save_context {
 
        struct ostream *dbox_output;
 
-       unsigned int failed:1;
-       unsigned int finished:1;
-       unsigned int have_pop3_uidls:1;
-       unsigned int have_pop3_orders:1;
+       bool failed:1;
+       bool finished:1;
+       bool have_pop3_uidls:1;
+       bool have_pop3_orders:1;
 };
 
 void dbox_save_begin(struct dbox_save_context *ctx, struct istream *input);
index 261c236ac9973c235f7bd33359b1a837769d76ba..259d85484461dc0e1fd071f6003275a595d886fe 100644 (file)
@@ -21,7 +21,7 @@ struct mdbox_map {
 
        struct mailbox_list *root_list;
 
-       unsigned int verify_existing_file_ids:1;
+       bool verify_existing_file_ids:1;
 };
 
 struct mdbox_map_append {
@@ -42,7 +42,7 @@ struct mdbox_map_append_context {
 
        unsigned int files_nonappendable_count;
 
-       unsigned int failed:1;
+       bool failed:1;
 };
 
 struct mdbox_map_atomic_context {
@@ -51,10 +51,10 @@ struct mdbox_map_atomic_context {
        struct mail_index_sync_ctx *sync_ctx;
        struct mail_index_view *sync_view;
 
-       unsigned int map_refreshed:1;
-       unsigned int locked:1;
-       unsigned int success:1;
-       unsigned int failed:1;
+       bool map_refreshed:1;
+       bool locked:1;
+       bool success:1;
+       bool failed:1;
 };
 
 int mdbox_map_view_lookup_rec(struct mdbox_map *map,
index 5bc6548bf7c1c914bc7ead75bec7b84c9c0d349f..91a70e2ac2c82020c1ce08250b2d665bbac46ebe 100644 (file)
@@ -24,8 +24,8 @@ struct mdbox_map_transaction_context {
        struct mdbox_map_atomic_context *atomic;
        struct mail_index_transaction *trans;
 
-       unsigned int changed:1;
-       unsigned int committed:1;
+       bool changed:1;
+       bool committed:1;
 };
 
 static int mdbox_map_generate_uid_validity(struct mdbox_map *map);
index 5cf75e719dcba6f1b638b338885dc8a47af3fc29..4eece4f9338777e5b5f00de9a60c3f673649d4b3 100644 (file)
@@ -32,7 +32,7 @@ struct mdbox_rebuild_msg {
        uint32_t map_uid;
 
        uint16_t refcount;
-       unsigned int seen_zero_ref_in_map:1;
+       bool seen_zero_ref_in_map:1;
 };
 
 struct rebuild_msg_mailbox {
@@ -60,8 +60,8 @@ struct mdbox_storage_rebuild_context {
 
        struct rebuild_msg_mailbox prev_msg;
 
-       unsigned int have_pop3_uidls:1;
-       unsigned int have_pop3_orders:1;
+       bool have_pop3_uidls:1;
+       bool have_pop3_orders:1;
 };
 
 static struct mdbox_storage_rebuild_context *
index b77da52ae01083505ea87ada585ebc0dc303ab14..b89b620a3f06c9b9250d174746c59f3c886e55e4 100644 (file)
@@ -40,9 +40,9 @@ struct mdbox_storage {
           has changed from this value) */
        uint32_t corrupted_rebuild_count;
 
-       unsigned int corrupted:1;
-       unsigned int rebuilding_storage:1;
-       unsigned int preallocate_space:1;
+       bool corrupted:1;
+       bool rebuilding_storage:1;
+       bool preallocate_space:1;
 };
 
 struct mdbox_mail_index_record {
@@ -59,8 +59,8 @@ struct mdbox_mailbox {
        uint32_t map_uid_validity;
        uint32_t ext_id, hdr_ext_id, guid_ext_id;
 
-       unsigned int mdbox_deleted_synced:1;
-       unsigned int creating:1;
+       bool mdbox_deleted_synced:1;
+       bool creating:1;
 };
 
 extern struct dbox_storage_vfuncs mdbox_dbox_storage_vfuncs;
index 8e4eee6da7b5bac475a3c47f64011ec551142ca5..84bdbe112ca3a8a9c06659df70dbc397e1d4fcc1 100644 (file)
@@ -22,15 +22,15 @@ struct imapc_mailbox_list {
 
        /* mailboxes/subscriptions are fully refreshed only during
           mailbox list iteration. */
-       unsigned int refreshed_subscriptions:1;
-       unsigned int refreshed_mailboxes:1;
+       bool refreshed_subscriptions:1;
+       bool refreshed_mailboxes:1;
        /* mailbox list's "recently refreshed" state is reset by syncing a
           mailbox. mainly we use this to cache mailboxes' existence to avoid
           issuing a LIST command every time. */
-       unsigned int refreshed_mailboxes_recently:1;
-       unsigned int index_list_failed:1;
-       unsigned int root_sep_pending:1;
-       unsigned int root_sep_lookup_failed:1;
+       bool refreshed_mailboxes_recently:1;
+       bool index_list_failed:1;
+       bool root_sep_pending:1;
+       bool root_sep_lookup_failed:1;
 };
 
 int imapc_list_get_mailbox_flags(struct mailbox_list *list, const char *name,
index da463d98c14cbb79fc6634500983799f69e5825b..2d82c5a7c3256e58aa92942ffbacf4a86d338a0b 100644 (file)
@@ -29,8 +29,8 @@ struct imapc_save_context {
        ARRAY_TYPE(seq_range) dest_saved_uids;
        unsigned int save_count;
 
-       unsigned int failed:1;
-       unsigned int finished:1;
+       bool failed:1;
+       bool finished:1;
 };
 
 struct imapc_save_cmd_context {
index f2f89aeaa05c436654cda6ded84c1106b144bb59..921923bc2bafcf44e9984af24644993825a48235 100644 (file)
@@ -51,8 +51,8 @@ struct imapc_storage_client {
 
        ARRAY(struct imapc_storage_event_callback) untagged_callbacks;
 
-       unsigned int auth_failed:1;
-       unsigned int destroying:1;
+       bool auth_failed:1;
+       bool destroying:1;
 };
 
 struct imapc_storage {
@@ -68,7 +68,7 @@ struct imapc_storage {
 
        ARRAY(struct imapc_namespace) remote_namespaces;
 
-       unsigned int namespaces_requested:1;
+       bool namespaces_requested:1;
 };
 
 struct imapc_mail_cache {
@@ -130,11 +130,11 @@ struct imapc_mailbox {
        const char *guid_fetch_field_name;
        struct imapc_search_context *search_ctx;
 
-       unsigned int selecting:1;
-       unsigned int syncing:1;
-       unsigned int initial_sync_done:1;
-       unsigned int selected:1;
-       unsigned int exists_received:1;
+       bool selecting:1;
+       bool syncing:1;
+       bool initial_sync_done:1;
+       bool selected:1;
+       bool exists_received:1;
 };
 
 struct imapc_simple_context {
index 72e9790bffd8eb3eab9827d5f91d303e5e06851b..056ad48841401643551324b4e90ca55d27d66dcc 100644 (file)
@@ -14,7 +14,7 @@ struct imapc_sync_context {
        ARRAY_TYPE(seq_range) expunged_uids;
        unsigned int sync_command_count;
 
-       unsigned int failed:1;
+       bool failed:1;
 };
 
 struct mailbox_sync_context *
index 392420f652c17923bbf5d2fd52d833ade397a3e6..e7b1ed6b659e67e1d9225aaa9e1ab02c8575d741 100644 (file)
@@ -108,27 +108,27 @@ struct index_mail_data {
        ARRAY_TYPE(keywords) keywords;
        ARRAY_TYPE(keyword_indexes) keyword_indexes;
 
-       unsigned int initialized:1;
-       unsigned int save_sent_date:1;
-       unsigned int sent_date_parsed:1;
-       unsigned int save_envelope:1;
-       unsigned int save_bodystructure_header:1;
-       unsigned int save_bodystructure_body:1;
-       unsigned int save_message_parts:1;
-       unsigned int save_body_snippet:1;
-       unsigned int stream_has_only_header:1;
-       unsigned int parsed_bodystructure:1;
-       unsigned int hdr_size_set:1;
-       unsigned int body_size_set:1;
-       unsigned int messageparts_saved_to_cache:1;
-       unsigned int header_parsed:1;
-       unsigned int no_caching:1;
-       unsigned int forced_no_caching:1;
-       unsigned int destroying_stream:1;
-       unsigned int initialized_wrapper_stream:1;
-       unsigned int destroy_callback_set:1;
-       unsigned int prefetch_sent:1;
-       unsigned int header_parser_initialized:1;
+       bool initialized:1;
+       bool save_sent_date:1;
+       bool sent_date_parsed:1;
+       bool save_envelope:1;
+       bool save_bodystructure_header:1;
+       bool save_bodystructure_body:1;
+       bool save_message_parts:1;
+       bool save_body_snippet:1;
+       bool stream_has_only_header:1;
+       bool parsed_bodystructure:1;
+       bool hdr_size_set:1;
+       bool body_size_set:1;
+       bool messageparts_saved_to_cache:1;
+       bool header_parsed:1;
+       bool no_caching:1;
+       bool forced_no_caching:1;
+       bool destroying_stream:1;
+       bool initialized_wrapper_stream:1;
+       bool destroy_callback_set:1;
+       bool prefetch_sent:1;
+       bool header_parser_initialized:1;
 };
 
 struct index_mail {
@@ -150,11 +150,11 @@ struct index_mail {
        ARRAY(unsigned int) header_match_lines;
        uint8_t header_match_value;
 
-       unsigned int pop3_state_set:1;
+       bool pop3_state_set:1;
        /* mail created by mailbox_search_*() */
-       unsigned int search_mail:1;
+       bool search_mail:1;
        /* close() is being called from mail_free() */
-       unsigned int freeing:1;
+       bool freeing:1;
 };
 
 struct mail *
index 14914023fc9fe99f77f73387fe84c341f33aeb45..183da9de1fb4215e482cfb0f601cdc5e30ff0542 100644 (file)
@@ -14,7 +14,7 @@ struct index_rebuild_context {
        struct mail_index *backup_index;
        struct mail_index_view *backup_view;
 
-       unsigned int cache_used:1;
+       bool cache_used:1;
 };
 
 typedef unsigned int
index 44999d1c5f4190395879f9957ab3a1b0f3ca007e..e08f382c7d10aafa4b897f1e224142bdf0002677 100644 (file)
@@ -28,11 +28,11 @@ struct index_search_context {
        struct timeval last_nonblock_timeval;
        unsigned long long cost, next_time_check_cost;
 
-       unsigned int failed:1;
-       unsigned int sorted:1;
-       unsigned int have_seqsets:1;
-       unsigned int have_index_args:1;
-       unsigned int have_mailbox_args:1;
+       bool failed:1;
+       bool sorted:1;
+       bool have_seqsets:1;
+       bool have_index_args:1;
+       bool have_mailbox_args:1;
 };
 
 struct mail *index_search_get_mail(struct index_search_context *ctx);
index 46d0f198579693929c1130a238f0263e8c6c1d3a..38342ebe336814f64926eb19c20497672d76239c 100644 (file)
@@ -46,9 +46,9 @@ struct search_header_context {
 
         struct message_header_line *hdr;
 
-       unsigned int parse_headers:1;
-       unsigned int custom_header:1;
-       unsigned int threading:1;
+       bool parse_headers:1;
+       bool custom_header:1;
+       bool threading:1;
 };
 
 struct search_body_context {
index 6c05743cde60c0b25441ac4603578ee6da7063e0..4ed8b8c8e3c741c3713343a6d59b0576b03b457b 100644 (file)
@@ -36,12 +36,12 @@ struct sort_string_context {
        uint32_t ext_id, last_seq, highest_reset_id, prev_seq;
        uint32_t lowest_nonexpunged_zero;
 
-       unsigned int regetting:1;
-       unsigned int have_all_wanted:1;
-       unsigned int no_writing:1;
-       unsigned int reverse:1;
-       unsigned int seqs_nonsorted:1;
-       unsigned int broken:1;
+       bool regetting:1;
+       bool have_all_wanted:1;
+       bool no_writing:1;
+       bool reverse:1;
+       bool seqs_nonsorted:1;
+       bool broken:1;
 };
 
 static char expunged_msg;
index ed4b9992e890b0bb83ff779fe2fb8e01af53f22f..bea7fd0a954067801781e98bccd9d87debfb6559 100644 (file)
@@ -25,11 +25,11 @@ struct mail_thread_root_node {
        uint32_t parent_root_idx1;
 
        /* subject contained a Re: or Fwd: */
-       unsigned int reply_or_forward:1;
+       bool reply_or_forward:1;
        /* a dummy node */
-       unsigned int dummy:1;
+       bool dummy:1;
        /* ignore this node - it's a dummy without children */
-       unsigned int ignore:1;
+       bool ignore:1;
 };
 
 struct thread_finish_context {
@@ -42,8 +42,8 @@ struct thread_finish_context {
        ARRAY(struct mail_thread_shadow_node) shadow_nodes;
        unsigned int next_new_root_idx;
 
-       unsigned int use_sent_date:1;
-       unsigned int return_seqs:1;
+       bool use_sent_date:1;
+       bool return_seqs:1;
 };
 
 struct mail_thread_iterate_context {
index 4f44319188c353512ac7ea27f798703d33848ed7..ed2837b7bb4c34cdfebe6d50950df18842aa844f 100644 (file)
@@ -35,10 +35,10 @@ struct mail_thread_node {
           from our parent. */
        unsigned int parent_link_refcount:30;
        /* If uid is expunged, rebuild the thread tree. */
-       unsigned int expunge_rebuilds:1;
+       bool expunge_rebuilds:1;
        /* If a link between this node and its child gets unreferenced,
           rebuild the thread tree. */
-       unsigned int child_unref_rebuilds:1;
+       bool child_unref_rebuilds:1;
 };
 ARRAY_DEFINE_TYPE(mail_thread_node, struct mail_thread_node);
 #define MAIL_THREAD_NODE_EXISTS(node) \
index 5824a16c26ac2256711d56c4fbeb49986cb43f70..1004260ba2225e5d53c2ffe042d1bc4107cb6208 100644 (file)
@@ -26,8 +26,8 @@ struct mail_thread_context {
        struct mail_search_args *search_args;
        ARRAY_TYPE(seq_range) added_uids;
 
-       unsigned int failed:1;
-       unsigned int corrupted:1;
+       bool failed:1;
+       bool corrupted:1;
 };
 
 struct mail_thread_mailbox {
index 56e92ef2dc7c225267b9eb5cffdbc0e2c9bdd315..5c6a73f3bb176b356181f6859f103f7c6503388b 100644 (file)
@@ -11,8 +11,8 @@ struct mail_istream {
 
        struct mail *mail;
        uoff_t expected_size;
-       unsigned int files_read_increased:1;
-       unsigned int input_has_body:1;
+       bool files_read_increased:1;
+       bool input_has_body:1;
 };
 
 static bool i_stream_mail_try_get_cached_size(struct mail_istream *mstream)
index 493708ebe9d30656be67c0a42d7e594b0721b7ea..7b0ae7846282e03aec3f6aaf9f9c659e0c1b0a9f 100644 (file)
@@ -17,7 +17,7 @@
 
 struct hardlink_ctx {
        const char *dest_path;
-       unsigned int success:1;
+       bool success:1;
 };
 
 static int do_hardlink(struct maildir_mailbox *mbox, const char *path,
index f29fa97292044d6ac77de5c1888bd15403bd5df6..50bd4b9baeb89d07ac14ff4fe8af7e4b61b15685 100644 (file)
@@ -36,8 +36,8 @@ struct maildir_keywords {
         struct dotlock_settings dotlock_settings;
 
        time_t synced_mtime;
-       unsigned int synced:1;
-       unsigned int changed:1;
+       bool synced:1;
+       bool changed:1;
 };
 
 struct maildir_keywords_sync_ctx {
index c3ac128f6b9d33cc9ba5c4be11d731c9fa27b1c4..578e0fb7097f448835e24b951db33831a7128ff8 100644 (file)
@@ -34,7 +34,7 @@ struct maildir_filename {
        uoff_t size, vsize;
        enum mail_flags flags;
        unsigned int pop3_order;
-       unsigned int preserve_filename:1;
+       bool preserve_filename:1;
        unsigned int keywords_count;
        /* unsigned int keywords[]; */
 };
@@ -61,12 +61,12 @@ struct maildir_save_context {
        int fd;
        uint32_t first_seq, seq, last_nonrecent_uid;
 
-       unsigned int have_keywords:1;
-       unsigned int have_preserved_filenames:1;
-       unsigned int locked:1;
-       unsigned int failed:1;
-       unsigned int last_save_finished:1;
-       unsigned int locked_uidlist_refresh:1;
+       bool have_keywords:1;
+       bool have_preserved_filenames:1;
+       bool locked:1;
+       bool failed:1;
+       bool last_save_finished:1;
+       bool locked_uidlist_refresh:1;
 };
 
 static int maildir_file_move(struct maildir_save_context *ctx,
index 937c0d2ac235d1b6b0bad7f842be4d315ebacce8..de219aead373923e815fb5de81fd8158b2a95ae8 100644 (file)
@@ -84,12 +84,12 @@ struct maildir_mailbox {
        uint32_t maildir_ext_id;
        uint32_t maildir_list_index_ext_id;
 
-       unsigned int synced:1;
-       unsigned int syncing_commit:1;
-       unsigned int private_flags_mask_set:1;
-       unsigned int backend_readonly:1;
-       unsigned int backend_readonly_set:1;
-       unsigned int sync_uidlist_refreshed:1;
+       bool synced:1;
+       bool syncing_commit:1;
+       bool private_flags_mask_set:1;
+       bool backend_readonly:1;
+       bool backend_readonly_set:1;
+       bool sync_uidlist_refreshed:1;
 };
 
 extern struct mail_vfuncs maildir_mail_vfuncs;
index 1b80e41638f01f018efa6d778710844ca77c0f76..fdd881b44b57425f09cf1cb7a66931a740898170 100644 (file)
@@ -226,9 +226,9 @@ struct maildir_sync_context {
        struct maildir_uidlist_sync_ctx *uidlist_sync_ctx;
        struct maildir_index_sync_context *index_sync_ctx;
 
-       unsigned int partial:1;
-       unsigned int locked:1;
-       unsigned int racing:1;
+       bool partial:1;
+       bool locked:1;
+       bool racing:1;
 };
 
 void maildir_sync_set_racing(struct maildir_sync_context *ctx)
index c364bd6b6b272f75a9e1052dd32ec2ca16002670..e29b925670517ab4d05f00c694def8d152b47cc6 100644 (file)
@@ -90,15 +90,15 @@ struct maildir_uidlist {
 
        guid_128_t mailbox_guid;
 
-       unsigned int recreate:1;
-       unsigned int recreate_on_change:1;
-       unsigned int initial_read:1;
-       unsigned int initial_hdr_read:1;
-       unsigned int retry_rewind:1;
-       unsigned int locked_refresh:1;
-       unsigned int unsorted:1;
-       unsigned int have_mailbox_guid:1;
-       unsigned int opened_readonly:1;
+       bool recreate:1;
+       bool recreate_on_change:1;
+       bool initial_read:1;
+       bool initial_hdr_read:1;
+       bool retry_rewind:1;
+       bool locked_refresh:1;
+       bool unsorted:1;
+       bool have_mailbox_guid:1;
+       bool opened_readonly:1;
 };
 
 struct maildir_uidlist_sync_ctx {
@@ -113,11 +113,11 @@ struct maildir_uidlist_sync_ctx {
        unsigned int new_files_count;
        unsigned int finish_change_counter;
 
-       unsigned int partial:1;
-       unsigned int finished:1;
-       unsigned int changed:1;
-       unsigned int failed:1;
-       unsigned int locked:1;
+       bool partial:1;
+       bool finished:1;
+       bool changed:1;
+       bool failed:1;
+       bool locked:1;
 };
 
 struct maildir_uidlist_iter_ctx {
index 43d0e40a4f04041c293bbe5595024914e69352d4..455f73daf465421d54fbd3ccf055aad2282efc49 100644 (file)
@@ -15,13 +15,13 @@ struct raw_mbox_istream {
        uoff_t from_offset, hdr_offset, body_offset, mail_size;
        uoff_t input_peak_offset;
 
-       unsigned int locked:1;
-       unsigned int seeked:1;
-       unsigned int crlf_ending:1;
-       unsigned int corrupted:1;
-       unsigned int mail_size_forced:1;
-       unsigned int eof:1;
-       unsigned int header_missing_eoh:1;
+       bool locked:1;
+       bool seeked:1;
+       bool crlf_ending:1;
+       bool corrupted:1;
+       bool mail_size_forced:1;
+       bool eof:1;
+       bool header_missing_eoh:1;
 };
 
 static void i_stream_raw_mbox_destroy(struct iostream_private *stream)
index 3724c68ffcf1659486dfd8851a0a10ad85831f42..47bde17c32c012b561aebb625ec88c08ff61240e 100644 (file)
@@ -52,9 +52,9 @@ struct mbox_save_context {
        struct mbox_md5_context *mbox_md5_ctx;
        char *x_delivery_id_header;
 
-       unsigned int synced:1;
-       unsigned int failed:1;
-       unsigned int finished:1;
+       bool synced:1;
+       bool failed:1;
+       bool finished:1;
 };
 
 static void write_error(struct mbox_save_context *ctx)
index 2e69814cc49392886e32bed3ea744ae5af9f9a43..b1be46744b058c2d3c44460c5c6d95c95d3c9f12 100644 (file)
@@ -34,7 +34,7 @@ struct mbox_storage {
        const struct mbox_settings *set;
        enum mbox_lock_type *read_locks;
        enum mbox_lock_type *write_locks;
-       unsigned int lock_settings_initialized:1;
+       bool lock_settings_initialized:1;
 };
 
 struct mbox_mailbox {
@@ -59,16 +59,16 @@ struct mbox_mailbox {
 
        struct mbox_md5_vfuncs md5_v;
 
-       unsigned int no_mbox_file:1;
-       unsigned int invalid_mbox_file:1;
-       unsigned int mbox_broken_offsets:1;
-       unsigned int mbox_save_md5:1;
-       unsigned int mbox_dotlocked:1;
-       unsigned int mbox_used_privileges:1;
-       unsigned int mbox_privileged_locking:1;
-       unsigned int syncing:1;
-       unsigned int backend_readonly:1;
-       unsigned int backend_readonly_set:1;
+       bool no_mbox_file:1;
+       bool invalid_mbox_file:1;
+       bool mbox_broken_offsets:1;
+       bool mbox_save_md5:1;
+       bool mbox_dotlocked:1;
+       bool mbox_used_privileges:1;
+       bool mbox_privileged_locking:1;
+       bool syncing:1;
+       bool backend_readonly:1;
+       bool backend_readonly_set:1;
 };
 
 struct mbox_transaction_context {
index 275afe9d7b411ac25f7180baa65c808940aa80db..9d991acf01cbe4742bfeae02e1e0ab8c892a8269 100644 (file)
@@ -49,11 +49,11 @@ struct mbox_sync_mail {
        ARRAY_TYPE(keyword_indexes) keywords;
        uint8_t flags;
 
-       unsigned int uid_broken:1;
-       unsigned int expunged:1;
-       unsigned int pseudo:1;
-       unsigned int status_broken:1;
-       unsigned int xstatus_broken:1;
+       bool uid_broken:1;
+       bool expunged:1;
+       bool pseudo:1;
+       bool status_broken:1;
+       bool xstatus_broken:1;
 
        uoff_t from_offset;
        uoff_t body_size;
@@ -89,14 +89,14 @@ struct mbox_sync_mail_context {
        uint32_t parsed_uid, last_uid_updated_value;
        unsigned int last_uid_value_start_pos;
 
-       unsigned int have_eoh:1;
-       unsigned int need_rewrite:1;
-       unsigned int seen_imapbase:1;
-       unsigned int updated:1;
-       unsigned int recent:1;
-       unsigned int dirty:1;
-       unsigned int imapbase_rewrite:1;
-       unsigned int imapbase_updated:1;
+       bool have_eoh:1;
+       bool need_rewrite:1;
+       bool seen_imapbase:1;
+       bool updated:1;
+       bool recent:1;
+       bool dirty:1;
+       bool imapbase_rewrite:1;
+       bool imapbase_updated:1;
 };
 
 struct mbox_sync_context {
@@ -136,18 +136,18 @@ struct mbox_sync_context {
        uint32_t last_nonrecent_uid;
        off_t expunged_space, space_diff;
 
-       unsigned int dest_first_mail:1;
-       unsigned int first_mail_crlf_expunged:1;
+       bool dest_first_mail:1;
+       bool first_mail_crlf_expunged:1;
 
        /* global flags: */
-       unsigned int keep_recent:1;
-       unsigned int readonly:1;
-       unsigned int delay_writes:1;
-       unsigned int renumber_uids:1;
-       unsigned int moved_offsets:1;
-       unsigned int ext_modified:1;
-       unsigned int index_reset:1;
-       unsigned int errors:1;
+       bool keep_recent:1;
+       bool readonly:1;
+       bool delay_writes:1;
+       bool renumber_uids:1;
+       bool moved_offsets:1;
+       bool ext_modified:1;
+       bool index_reset:1;
+       bool errors:1;
 };
 
 int mbox_sync_header_refresh(struct mbox_mailbox *mbox);
index e74fe2249736d48fa9331343e10423027b2a4918..e11c24425b2a4ed0520195e06fc0294ac3ab7f2c 100644 (file)
@@ -79,7 +79,7 @@ struct pop3c_client {
        const char *input_line;
        struct istream *dot_input;
 
-       unsigned int running:1;
+       bool running:1;
 };
 
 static void
index 8f0cbdd737cb93bf286ace69217e665d83375511..0cb3657fc4ed35888319d1ad0ad5070d1f2532bb 100644 (file)
@@ -26,15 +26,15 @@ struct pop3c_mailbox {
           the UID may not exist for the entire session */
        uint32_t *msg_uids;
 
-       unsigned int logged_in:1;
+       bool logged_in:1;
 };
 
 struct pop3c_mail {
        struct index_mail imail;
        struct istream *prefetch_stream;
 
-       unsigned int prefetching:1;
-       unsigned int prefetching_body:1;
+       bool prefetching:1;
+       bool prefetching_body:1;
 };
 
 struct mail *
index fddd998a915667ab65533aeb3e5472e2fae377e9..b1384b8da1671384ce191dd974142846cb58aaba 100644 (file)
@@ -18,8 +18,8 @@ struct raw_mailbox {
        uoff_t size;
        const char *envelope_sender;
 
-       unsigned int synced:1;
-       unsigned int have_filename:1;
+       bool synced:1;
+       bool have_filename:1;
 };
 
 extern struct mail_vfuncs raw_mail_vfuncs;
index 9606db4dbffa8f72aa1830424077593807286a77..57661e10b6f9f03613282f58978e4cc4e799f577 100644 (file)
@@ -48,9 +48,9 @@ struct fs_list_iterate_context {
        /* current directory we're handling */
        struct list_dir_context *dir;
 
-       unsigned int inbox_found:1;
-       unsigned int inbox_has_children:1;
-       unsigned int list_inbox_inbox:1;
+       bool inbox_found:1;
+       bool inbox_has_children:1;
+       bool list_inbox_inbox:1;
 };
 
 static int
index d19982142e6fe2de360c10a4999a5a195fc4f844..73b513e5a250d529f7ab6a28b3f887c20c36e01b 100644 (file)
@@ -61,9 +61,9 @@ struct mailbox_list_notify_index {
        char *list_log_path, *inbox_log_path;
        struct stat list_last_st, inbox_last_st;
 
-       unsigned int initialized:1;
-       unsigned int read_failed:1;
-       unsigned int inbox_event_pending:1;
+       bool initialized:1;
+       bool read_failed:1;
+       bool inbox_event_pending:1;
 };
 
 int mailbox_list_index_notify_init(struct mailbox_list *list,
index 8b5815486cea4ca2b8b7bf757ae84bad49703615..cb8972ecb5544381ba019964a475954857a92815 100644 (file)
@@ -14,7 +14,7 @@ struct mailbox_list_index_sync_context {
        struct mail_index_view *view;
        struct mail_index_transaction *trans;
 
-       unsigned int syncing_list:1;
+       bool syncing_list:1;
 };
 
 int mailbox_list_index_sync_begin(struct mailbox_list *list,
index 6fe9ccd2985d53a7a6e834ec58762f38103afa4a..48a6610c884e39f00c2b95a8ad9ffd6023224427 100644 (file)
@@ -107,12 +107,12 @@ struct mailbox_list_index {
        HASH_TABLE(void *, struct mailbox_list_index_node *) mailbox_hash;
        struct mailbox_list_index_node *mailbox_tree;
 
-       unsigned int pending_init:1;
-       unsigned int opened:1;
-       unsigned int syncing:1;
-       unsigned int updating_status:1;
-       unsigned int has_backing_store:1;
-       unsigned int index_last_check_changed:1;
+       bool pending_init:1;
+       bool opened:1;
+       bool syncing:1;
+       bool updating_status:1;
+       bool has_backing_store:1;
+       bool index_last_check_changed:1;
 };
 
 struct mailbox_list_index_iterate_context {
@@ -127,7 +127,7 @@ struct mailbox_list_index_iterate_context {
        string_t *path;
        struct mailbox_list_index_node *next_node;
 
-       unsigned int failed:1;
+       bool failed:1;
 };
 
 extern MODULE_CONTEXT_DEFINE(mailbox_list_index_module,
index 2c1381b834c0f58e653b33e07fd87d5e60854650..b01774d348a675722cec6781e7ee552a75012750 100644 (file)
@@ -46,9 +46,9 @@ struct ns_list_iterate_context {
        struct mailbox_info inbox_info;
        const struct mailbox_info *pending_backend_info;
 
-       unsigned int cur_ns_prefix_sent:1;
-       unsigned int inbox_list:1;
-       unsigned int inbox_listed:1;
+       bool cur_ns_prefix_sent:1;
+       bool inbox_list:1;
+       bool inbox_listed:1;
 };
 
 static bool ns_match_next(struct ns_list_iterate_context *ctx, 
index 610e0f708021dc84c089dec031c9904211034ef0..8db6f2a026bec63a2a9d895be2f69dd5acd6ee7d 100644 (file)
@@ -10,7 +10,7 @@
 struct noop_list_iterate_context {
        struct mailbox_list_iterate_context ctx;
        struct mailbox_info inbox_info;
-       unsigned int list_inbox:1;
+       bool list_inbox:1;
 };
 
 extern struct mailbox_list none_mailbox_list;
index ce57a0f23a37af29cbc1bf3249d2dd7dfb6bf242..ca2e2b37086cf65d2b6c20b5327a7073517a1d49 100644 (file)
@@ -73,8 +73,8 @@ struct mail_namespace {
        const struct mail_namespace_settings *set, *unexpanded_set;
        const struct mail_storage_settings *mail_set;
 
-       unsigned int special_use_mailboxes:1;
-       unsigned int destroyed:1;
+       bool special_use_mailboxes:1;
+       bool destroyed:1;
 };
 
 int mail_namespaces_init(struct mail_user *user, const char **error_r);
index 3e825e13877b463d21e6941d9e5698b0347f181e..baffe2d2868b94bb364f0f03b764614de89738ef 100644 (file)
@@ -9,7 +9,7 @@ struct mail_search_register {
        ARRAY(struct mail_search_register_arg) args;
        mail_search_register_fallback_t *fallback;
 
-       unsigned int args_sorted:1;
+       bool args_sorted:1;
 };
 
 struct mail_search_register *mail_search_register_init(void)
index e0a9fd0aa2d37b06749ea0948c21f66bab1e1896..2e17891364d000c945b98060d0288efa621367c9 100644 (file)
@@ -97,11 +97,11 @@ struct mail_search_arg {
 
         void *context;
        const char *hdr_field_name; /* for SEARCH_HEADER* */
-       unsigned int match_not:1; /* result = !result */
-       unsigned int match_always:1; /* result = 1 always */
-       unsigned int nonmatch_always:1; /* result = 0 always */
-       unsigned int fuzzy:1; /* use fuzzy matching for this arg */
-       unsigned int no_fts:1; /* do NOT call FTS */
+       bool match_not:1; /* result = !result */
+       bool match_always:1; /* result = 1 always */
+       bool nonmatch_always:1; /* result = 0 always */
+       bool fuzzy:1; /* use fuzzy matching for this arg */
+       bool no_fts:1; /* do NOT call FTS */
 
        int result; /* -1 = unknown, 0 = unmatched, 1 = matched */
 };
@@ -113,14 +113,14 @@ struct mail_search_args {
        struct mailbox *box;
        struct mail_search_arg *args;
 
-       unsigned int simplified:1;
-       unsigned int have_inthreads:1;
+       bool simplified:1;
+       bool have_inthreads:1;
        /* Stop mail_search_next() when finding a non-matching mail.
           (Could be useful when wanting to find only the oldest mails.) */
-       unsigned int stop_on_nonmatch:1;
+       bool stop_on_nonmatch:1;
        /* fts plugin has already expanded the search args - no need to do
           it again. */
-       unsigned int fts_expanded:1;
+       bool fts_expanded:1;
 };
 
 #define ARG_SET_RESULT(arg, res) \
index 0aad8f83f80cbed4a15795ae5193162d1dfade6d..726fd7faf1800d2809e364e8ab571f57fb8a68bb 100644 (file)
@@ -142,7 +142,7 @@ struct mail_storage {
        ARRAY(union mail_storage_module_context *) module_contexts;
 
        /* Failed to create shared attribute dict, don't try again */
-       unsigned int shared_attr_dict_failed:1;
+       bool shared_attr_dict_failed:1;
 };
 
 struct mail_attachment_part {
@@ -371,40 +371,40 @@ struct mailbox {
 
        /* When FAST open flag is used, the mailbox isn't actually opened until
           it's synced for the first time. */
-       unsigned int opened:1;
+       bool opened:1;
        /* Mailbox was deleted while we had it open. */
-       unsigned int mailbox_deleted:1;
+       bool mailbox_deleted:1;
        /* Mailbox is being created */
-       unsigned int creating:1;
+       bool creating:1;
        /* Mailbox is being deleted */
-       unsigned int deleting:1;
+       bool deleting:1;
        /* Don't use MAIL_INDEX_SYNC_FLAG_DELETING_INDEX for sync flag */
-       unsigned int delete_sync_check:1;
+       bool delete_sync_check:1;
        /* Delete mailbox only if it's empty */
-       unsigned int deleting_must_be_empty:1;
+       bool deleting_must_be_empty:1;
        /* The backend wants to skip checking if there are 0 messages before
           calling mailbox_list.delete_mailbox() */
-       unsigned int delete_skip_empty_check:1;
+       bool delete_skip_empty_check:1;
        /* Mailbox was already marked as deleted within this allocation. */
-       unsigned int marked_deleted:1;
+       bool marked_deleted:1;
        /* TRUE if this is an INBOX for this user */
-       unsigned int inbox_user:1;
+       bool inbox_user:1;
        /* TRUE if this is an INBOX for this namespace (user or shared) */
-       unsigned int inbox_any:1;
+       bool inbox_any:1;
        /* When copying to this mailbox, require that mailbox_copy() uses
           mailbox_save_*() to actually save a new physical copy rather than
           simply incrementing a reference count (e.g. via hard link) */
-       unsigned int disable_reflink_copy_to:1;
+       bool disable_reflink_copy_to:1;
        /* Don't allow creating any new keywords */
-       unsigned int disallow_new_keywords:1;
+       bool disallow_new_keywords:1;
        /* Mailbox has been synced at least once */
-       unsigned int synced:1;
+       bool synced:1;
        /* Updating cache file is disabled */
-       unsigned int mail_cache_disabled:1;
+       bool mail_cache_disabled:1;
        /* Update first_saved field to mailbox list index. */
-       unsigned int update_first_saved:1;
+       bool update_first_saved:1;
        /* mailbox_verify_create_name() only checks for mailbox_verify_name() */
-       unsigned int skip_create_name_restrictions:1;
+       bool skip_create_name_restrictions:1;
 };
 
 struct mail_vfuncs {
@@ -561,11 +561,11 @@ struct mailbox_transaction_context {
        /* these statistics are never reset by mail-storage API: */
        struct mailbox_transaction_stats stats;
        /* Set to TRUE to update stats_* fields */
-       unsigned int stats_track:1;
+       bool stats_track:1;
        /* We've done some non-transactional (e.g. dovecot-uidlist updates) */
-       unsigned int nontransactional_changes:1;
+       bool nontransactional_changes:1;
        /* FIXME: v2.3: this should be in attribute_get/set() parameters */
-       unsigned int internal_attribute:1;
+       bool internal_attribute:1;
 };
 
 union mail_search_module_context {
@@ -594,8 +594,8 @@ struct mail_search_context {
 
        ARRAY(union mail_search_module_context *) module_contexts;
 
-       unsigned int seen_lost_data:1;
-       unsigned int progress_hidden:1;
+       bool seen_lost_data:1;
+       bool progress_hidden:1;
 };
 
 struct mail_save_data {
@@ -628,15 +628,15 @@ struct mail_save_context {
 
        /* mailbox_save_alloc() called, but finish/cancel not.
           the same context is usually returned by the backends for reuse. */
-       unsigned int unfinished:1;
+       bool unfinished:1;
        /* mailbox_save_finish() or mailbox_copy() is being called. */
-       unsigned int finishing:1;
+       bool finishing:1;
        /* mail was copied using saving */
-       unsigned int copying_via_save:1;
+       bool copying_via_save:1;
        /* mail is being saved, not copied */
-       unsigned int saving:1;
+       bool saving:1;
        /* mail is being moved - ignore quota */
-       unsigned int moving:1;
+       bool moving:1;
 };
 
 struct mailbox_sync_context {
index 47b8e89f1faad36d28cc32d382202f9a5e83b5c1..6ce5566f2103804238c2f9f34535e28a505f751c 100644 (file)
@@ -63,9 +63,9 @@ struct mail_storage_service_ctx {
        pool_t userdb_next_pool;
        const char *const **userdb_next_fieldsp;
 
-       unsigned int debug:1;
-       unsigned int log_initialized:1;
-       unsigned int config_permission_denied:1;
+       bool debug:1;
+       bool log_initialized:1;
+       bool config_permission_denied:1;
 };
 
 struct mail_storage_service_user {
@@ -84,8 +84,8 @@ struct mail_storage_service_user {
 
        unsigned int session_id_counter;
 
-       unsigned int anonymous:1;
-       unsigned int admin:1;
+       bool anonymous:1;
+       bool admin:1;
 };
 
 struct module *mail_storage_service_modules = NULL;
index 2f8f1ef8accd86390ddcd31f1dc1a65cb0f8e5d4..b6db2bcfdb12b21cf719c69c87e3b281226b999e 100644 (file)
@@ -57,9 +57,9 @@ struct mail_storage_service_input {
        enum mail_storage_service_flags flags_override_remove;
 
        /* override MAIL_STORAGE_SERVICE_FLAG_USERDB_LOOKUP for this lookup */
-       unsigned int no_userdb_lookup:1;
+       bool no_userdb_lookup:1;
        /* Enable auth_debug=yes for this lookup */
-       unsigned int debug:1;
+       bool debug:1;
 };
 
 extern struct module *mail_storage_service_modules;
index 64804b4f334e68d6c9979cf93faf5f64d4a3bc68..b4b8cd43bc79b17c803118f8527821aeb1728629 100644 (file)
@@ -252,21 +252,21 @@ struct mailbox_status {
        enum mail_flags permanent_flags;
 
        /* All keywords can be permanently modified (STATUS_PERMANENT_FLAGS) */
-       unsigned int permanent_keywords:1;
+       bool permanent_keywords:1;
        /* More keywords can be created (STATUS_PERMANENT_FLAGS) */
-       unsigned int allow_new_keywords:1;
+       bool allow_new_keywords:1;
        /* Modseqs aren't permanent (index is in memory) (STATUS_HIGHESTMODSEQ) */
-       unsigned int nonpermanent_modseqs:1;
+       bool nonpermanent_modseqs:1;
        /* Modseq tracking has never been enabled for this mailbox
           yet. (STATUS_HIGHESTMODSEQ) */
-       unsigned int no_modseq_tracking:1;
+       bool no_modseq_tracking:1;
 
        /* Messages have GUIDs (always set) */
-       unsigned int have_guids:1;
+       bool have_guids:1;
        /* mailbox_save_set_guid() works (always set) */
-       unsigned int have_save_guids:1;
+       bool have_save_guids:1;
        /* GUIDs are always 128bit (always set) */
-       unsigned int have_only_guid128:1;
+       bool have_only_guid128:1;
 };
 
 struct mailbox_cache_field {
@@ -338,7 +338,7 @@ struct mailbox_sync_rec {
 };
 struct mailbox_sync_status {
        /* There are expunges that haven't been synced yet */
-       unsigned int sync_delayed_expunges:1;
+       bool sync_delayed_expunges:1;
 };
 
 struct mailbox_expunge_rec {
@@ -365,10 +365,10 @@ struct mail {
        struct mailbox_transaction_context *transaction;
        uint32_t seq, uid;
 
-       unsigned int expunged:1;
-       unsigned int saving:1; /* This mail is still being saved */
-       unsigned int has_nuls:1; /* message data is known to contain NULs */
-       unsigned int has_no_nuls:1; /* -''- known to not contain NULs */
+       bool expunged:1;
+       bool saving:1; /* This mail is still being saved */
+       bool has_nuls:1; /* message data is known to contain NULs */
+       bool has_no_nuls:1; /* -''- known to not contain NULs */
 
        /* If the lookup is aborted, error is set to MAIL_ERROR_NOTPOSSIBLE */
        enum mail_lookup_abort lookup_abort;
index dfeadc46024a3d9e60988c7fd75bc757d82e783d..e280a823eff9c0bcde0be6cd5052adc4df0eeb99 100644 (file)
@@ -59,38 +59,38 @@ struct mail_user {
 
        /* User doesn't exist (as reported by userdb lookup when looking
           up home) */
-       unsigned int nonexistent:1;
+       bool nonexistent:1;
        /* Either home is set or there is no home for the user. */
-       unsigned int home_looked_up:1;
+       bool home_looked_up:1;
        /* User is anonymous */
-       unsigned int anonymous:1;
+       bool anonymous:1;
        /* This is an autocreated user (e.g. for shared namespace or
           lda raw storage) */
-       unsigned int autocreated:1;
+       bool autocreated:1;
        /* mail_user_init() has been called */
-       unsigned int initialized:1;
+       bool initialized:1;
        /* SET_STR_VARS in user's all settings have been expanded.
           This happens near the beginning of the user initialization,
           so this is rarely needed to be checked. */
-       unsigned int settings_expanded:1;
+       bool settings_expanded:1;
        /* Shortcut to mail_storage_settings.mail_debug */
-       unsigned int mail_debug:1;
+       bool mail_debug:1;
        /* If INBOX can't be opened, log an error, but only once. */
-       unsigned int inbox_open_error_logged:1;
+       bool inbox_open_error_logged:1;
        /* Fuzzy search works for this user (FTS enabled) */
-       unsigned int fuzzy_search:1;
+       bool fuzzy_search:1;
        /* We're running dsync */
-       unsigned int dsyncing:1;
+       bool dsyncing:1;
        /* Failed to create attribute dict, don't try again */
-       unsigned int attr_dict_failed:1;
+       bool attr_dict_failed:1;
        /* We're deinitializing the user */
-       unsigned int deinitializing:1;
+       bool deinitializing:1;
        /* Enable administrator user commands for the user */
-       unsigned int admin:1;
+       bool admin:1;
        /* Enable all statistics gathering */
-       unsigned int stats_enabled:1;
+       bool stats_enabled:1;
        /* Enable autoexpunging at deinit. */
-       unsigned int autoexpunge_enabled:1;
+       bool autoexpunge_enabled:1;
 };
 
 struct mail_user_module_register {
index 30b61a82a6c3134260b368bde0d24290c5aa3913..f444acc6098821a9fee650bb577bca75405cb9f2 100644 (file)
@@ -132,9 +132,9 @@ struct mailbox_list {
 
        ARRAY(union mailbox_list_module_context *) module_contexts;
 
-       unsigned int index_root_dir_created:1;
-       unsigned int guid_cache_updated:1;
-       unsigned int guid_cache_invalidated:1;
+       bool index_root_dir_created:1;
+       bool guid_cache_updated:1;
+       bool guid_cache_invalidated:1;
 };
 
 union mailbox_list_iterate_module_context {
@@ -161,8 +161,8 @@ struct mailbox_list_iter_update_context {
        struct imap_match_glob *glob;
        enum mailbox_info_flags leaf_flags, parent_flags;
 
-       unsigned int update_only:1;
-       unsigned int match_parents:1;
+       bool update_only:1;
+       bool match_parents:1;
 };
 
 /* Modules should use do "my_id = mailbox_list_module_id++" and
index c05417888b8e6743a523f73cf00d3f43bbec97cb..983ac3c73f903eb53ec43b3352e6c3c6416a9a75 100644 (file)
@@ -14,9 +14,9 @@ struct mail_search_result {
        ARRAY_TYPE(seq_range) never_uids;
        ARRAY_TYPE(seq_range) removed_uids, added_uids;
 
-       unsigned int args_have_flags:1;
-       unsigned int args_have_keywords:1;
-       unsigned int args_have_modseq:1;
+       bool args_have_flags:1;
+       bool args_have_keywords:1;
+       bool args_have_modseq:1;
 };
 
 struct mail_search_result *
index d78d909a08697d6da6e924869fa7399cae585bea..3afdcff71874929be50ac0daab55fd62584e4daf 100644 (file)
@@ -25,7 +25,7 @@ struct mailbox_tree_iterate_context {
        string_t *path_str;
        size_t parent_pos;
 
-       unsigned int first_child:1;
+       bool first_child:1;
 };
 
 struct mailbox_tree_context *mailbox_tree_init(char separator)
index 65025cb7fe2c386fb25a73a35dca2380104919b9..4bcd91261cf91c234ea4741d789607d609110258 100644 (file)
@@ -16,8 +16,8 @@ struct real_buffer {
 
        pool_t pool;
 
-       unsigned int alloced:1;
-       unsigned int dynamic:1;
+       bool alloced:1;
+       bool dynamic:1;
 };
 typedef int buffer_check_sizes[COMPILE_ERROR_IF_TRUE(sizeof(struct real_buffer) > sizeof(buffer_t)) ?1:1];
 
index 3d32ca353663f60c39f182e236bfc610d13adf70..cee9669d6f64d000d00ed55f55a06f33a8e6ded0 100644 (file)
@@ -90,7 +90,7 @@ struct connection {
 
        enum connection_disconnect_reason disconnect_reason;
 
-       unsigned int version_received:1;
+       bool version_received:1;
 };
 
 struct connection_list {
index 90219a7b920e5126f80aef4b4736ad70846d66a8..c4a81acd352ebcc33f4de1d3b977cb870e38e44e 100644 (file)
@@ -69,10 +69,10 @@ struct lock_info {
        time_t last_change;
        unsigned int wait_usecs;
 
-       unsigned int have_pid:1;
-       unsigned int pid_read:1;
-       unsigned int use_io_notify:1;
-       unsigned int lock_stated:1;
+       bool have_pid:1;
+       bool pid_read:1;
+       bool use_io_notify:1;
+       bool lock_stated:1;
 };
 
 static struct dotlock *
index c2e21312bc83294f903554ce9ff44558434cf3f1..0b958c8df134554c99bed57e9940f1e0105ecb2e 100644 (file)
@@ -29,12 +29,12 @@ struct dotlock_settings {
 
        /* Rely on O_EXCL locking to work instead of using hardlinks.
           It's faster, but doesn't work with all NFS implementations. */
-       unsigned int use_excl_lock:1;
+       bool use_excl_lock:1;
        /* Flush NFS attribute cache before stating files. */
-       unsigned int nfs_flush:1;
+       bool nfs_flush:1;
        /* Use io_add_notify() to speed up finding out when an existing
           dotlock is deleted */
-       unsigned int use_io_notify:1;
+       bool use_io_notify:1;
 };
 
 enum dotlock_create_flags {
index b50f86179e104fdcefdd545f22e6a8c5061c0a6a..4cd5e20d0c4fbfbed267effaed741ef837cdc696 100644 (file)
@@ -29,8 +29,8 @@ struct ioloop {
 
        unsigned int io_pending_count;
 
-       unsigned int running:1;
-       unsigned int iolooping:1;
+       bool running:1;
+       bool iolooping:1;
 };
 
 struct io {
@@ -73,7 +73,7 @@ struct timeout {
        struct ioloop *ioloop;
        struct ioloop_context *ctx;
 
-       unsigned int one_shot:1;
+       bool one_shot:1;
 };
 
 struct ioloop_context_callback {
index 445059cce22039001dfaab288bb6c562b6cc39b5..ded34c151dabdb24f92e54ef02f44a554b243710 100644 (file)
@@ -7,8 +7,8 @@
 struct crlf_istream {
        struct istream_private istream;
 
-       unsigned int pending_cr:1;
-       unsigned int last_cr:1;
+       bool pending_cr:1;
+       bool last_cr:1;
 };
 
 static int i_stream_crlf_read_common(struct crlf_istream *cstream)
index d0666660a42db9b5525dad96e8c1b83d775f465f..c4701ed2ff902d5887836175c678b23f1b42ae59 100644 (file)
@@ -8,9 +8,9 @@ struct file_istream {
 
        uoff_t skip_left;
 
-       unsigned int file:1;
-       unsigned int autoclose_fd:1;
-       unsigned int seen_eof:1;
+       bool file:1;
+       bool autoclose_fd:1;
+       bool seen_eof:1;
 };
 
 struct istream *
index 51caf7442f5c5e4cc4ddd610b4cf50a1672fad1d..1425fbf4bd0819281ea83cfcd0982da8e892012c 100644 (file)
@@ -13,7 +13,7 @@ struct jsonstr_istream {
        struct istream_private istream;
 
        /* The end '"' was found */
-       unsigned int str_end:1;
+       bool str_end:1;
 };
 
 static int
index 7e1e1ab1308a7631a16b88a1da3fc713f89cdbab..b5f0806aa7b9855ae0e21f12a101d5663c4bbedc 100644 (file)
@@ -17,7 +17,7 @@ struct mmap_istream {
        off_t mmap_offset;
        uoff_t v_size;
 
-       unsigned int autoclose_fd:1;
+       bool autoclose_fd:1;
 };
 
 static size_t mmap_pagemask = 0;
index 0fceda027356e42d8ffd0ff4ecd2fc7068ce0773..6e86080854772c3a0389f4db6f5ed6ed4ee3af11 100644 (file)
@@ -49,10 +49,10 @@ struct istream_private {
        unsigned int access_counter;
 
        string_t *line_str; /* for i_stream_next_line() if w_buffer == NULL */
-       unsigned int line_crlf:1;
-       unsigned int return_nolf_line:1;
-       unsigned int stream_size_passthrough:1; /* stream is parent's size */
-       unsigned int nonpersistent_buffers:1;
+       bool line_crlf:1;
+       bool return_nolf_line:1;
+       bool stream_size_passthrough:1; /* stream is parent's size */
+       bool nonpersistent_buffers:1;
 };
 
 struct istream * ATTR_NOWARN_UNUSED_RESULT
index 6462844f5eca758317155511833eb58a08e1c1f4..0e6f6bb1b940602ab800760c14bee87ca647f841 100644 (file)
@@ -17,7 +17,7 @@ struct tee_child_istream {
        struct tee_istream *tee;
        struct tee_child_istream *next;
 
-       unsigned int last_read_waiting:1;
+       bool last_read_waiting:1;
 };
 
 static void tee_streams_update_buffer(struct tee_istream *tee)
index b987b5acec56709cc6e57a6bcda7253dd80afbba..9f93f299d9a065aa78676b35d46dca40b28b877a 100644 (file)
@@ -8,13 +8,13 @@ struct istream {
        uoff_t v_offset;
 
        int stream_errno;
-       unsigned int mmaped:1; /* be careful when copying data */
-       unsigned int blocking:1; /* read() shouldn't return 0 */
-       unsigned int closed:1;
-       unsigned int readable_fd:1; /* fd can be read directly if necessary
+       bool mmaped:1; /* be careful when copying data */
+       bool blocking:1; /* read() shouldn't return 0 */
+       bool closed:1;
+       bool readable_fd:1; /* fd can be read directly if necessary
                                       (for sendfile()) */
-       unsigned int seekable:1; /* we can seek() backwards */
-       unsigned int eof:1; /* read() has reached to end of file
+       bool seekable:1; /* we can seek() backwards */
+       bool eof:1; /* read() has reached to end of file
                               (but may still be data available in buffer) */
 
        struct istream_private *real_stream;
index aa2d34b2f0fad22a33210c2f7a0559dbcf7c5fb5..ae8bf6afc29fb827c0dea3990827e9ed7c1f1d04 100644 (file)
@@ -42,8 +42,8 @@ struct pool_vfuncs {
 struct pool {
        const struct pool_vfuncs *v;
 
-       unsigned int alloconly_pool:1;
-       unsigned int datastack_pool:1;
+       bool alloconly_pool:1;
+       bool datastack_pool:1;
 };
 
 /* system_pool uses calloc() + realloc() + free() */
index f9c5d57d4c0cda196a61d2beab012d121d664702..f62e90677c4e2cac06f67d3a42cddd5daa55c524 100644 (file)
@@ -18,13 +18,13 @@ struct module_dir_load_settings {
        void *filter_context;
 
        /* Require all plugins to have <plugin_name>_init() function */
-       unsigned int require_init_funcs:1;
+       bool require_init_funcs:1;
        /* Enable debug logging */
-       unsigned int debug:1;
+       bool debug:1;
        /* If dlopen() fails for some modules, silently skip it. */
-       unsigned int ignore_dlopen_errors:1;
+       bool ignore_dlopen_errors:1;
        /* Don't fail if some specified modules weren't found */
-       unsigned int ignore_missing:1;
+       bool ignore_missing:1;
 };
 
 struct module {
@@ -34,7 +34,7 @@ struct module {
        void (*init)(struct module *module);
        void (*deinit)(void);
 
-       unsigned int initialized:1;
+       bool initialized:1;
 
         struct module *next;
 };
index f2bcdaaf0fdd668af23381f6db879c328817dcb7..39da5bd3e644db47102eb05227712eb771c5bd09 100644 (file)
@@ -19,13 +19,13 @@ struct file_ostream {
        size_t buffer_size, optimal_block_size;
        size_t head, tail; /* first unsent/unused byte */
 
-       unsigned int full:1; /* if head == tail, is buffer empty or full? */
-       unsigned int file:1;
-       unsigned int flush_pending:1;
-       unsigned int socket_cork_set:1;
-       unsigned int no_socket_cork:1;
-       unsigned int no_sendfile:1;
-       unsigned int autoclose_fd:1;
+       bool full:1; /* if head == tail, is buffer empty or full? */
+       bool file:1;
+       bool flush_pending:1;
+       bool socket_cork_set:1;
+       bool no_socket_cork:1;
+       bool no_sendfile:1;
+       bool autoclose_fd:1;
 };
 
 struct ostream *
index c792e87dd873472ecab1c32115ca8fb22e59e44e..f35d472362c0910a061024a1e3ce21502ad4b2d8 100644 (file)
@@ -37,11 +37,11 @@ struct ostream_private {
        stream_flush_callback_t *callback;
        void *context;
 
-       unsigned int corked:1;
-       unsigned int closing:1;
-       unsigned int last_errors_not_checked:1;
-       unsigned int error_handling_disabled:1;
-       unsigned int noverflow:1;
+       bool corked:1;
+       bool closing:1;
+       bool last_errors_not_checked:1;
+       bool error_handling_disabled:1;
+       bool noverflow:1;
 };
 
 struct ostream *
index 7b1901ec9218f3e33955fb361982351db1c5f70b..32f95d229bee00a638b3721f80f8e72a1f078e74 100644 (file)
@@ -35,10 +35,10 @@ struct ostream {
        /* overflow is set when some of the data given to send()
           functions was neither sent nor buffered. It's never unset inside
           ostream code. */
-       unsigned int overflow:1;
+       bool overflow:1;
        /* o_stream_send() writes all the data or returns failure */
-       unsigned int blocking:1;
-       unsigned int closed:1;
+       bool blocking:1;
+       bool closed:1;
 
        struct ostream_private *real_stream;
 };
index c5b8b4413536c9a6a1d3d5ea5b476ed916ae3fec..5166374bfa1dd15ef1e56318d77a9d9343a06a76 100644 (file)
@@ -45,8 +45,8 @@ struct client_state {
        struct mail_user *dest_user;
        struct mail *first_saved_mail;
 
-       unsigned int mail_body_7bit:1;
-       unsigned int mail_body_8bitmime:1;
+       bool mail_body_7bit:1;
+       bool mail_body_8bitmime:1;
 };
 
 struct client {
@@ -80,7 +80,7 @@ struct client {
        unsigned int proxy_ttl;
        unsigned int proxy_timeout_secs;
 
-       unsigned int disconnected:1;
+       bool disconnected:1;
 };
 
 extern unsigned int clients_count;
index 7066251f5b2f5d3281d1b079e0ba003d871cdf03..6477edaab58eec18111e9311e78d940a94b478b7 100644 (file)
@@ -19,8 +19,8 @@ struct lmtp_proxy_recipient {
        const char *reply;
        unsigned int idx;
 
-       unsigned int rcpt_to_failed:1;
-       unsigned int data_reply_received:1;
+       bool rcpt_to_failed:1;
+       bool data_reply_received:1;
 };
 
 struct lmtp_proxy_connection {
@@ -31,8 +31,8 @@ struct lmtp_proxy_connection {
        struct istream *data_input;
        struct timeout *to;
 
-       unsigned int finished:1;
-       unsigned int failed:1;
+       bool finished:1;
+       bool failed:1;
 };
 
 struct lmtp_proxy {
@@ -53,7 +53,7 @@ struct lmtp_proxy {
        lmtp_proxy_finish_callback_t *finish_callback;
        void *finish_context;
 
-       unsigned int finished:1;
+       bool finished:1;
 };
 
 static void lmtp_conn_finish(void *context);
index 2f96a8ce2931e3ed0782316c0db018af000919d6..6eac6e8177186e79566f20fc595d30ef24d88696 100644 (file)
@@ -28,7 +28,7 @@
 struct log_client {
        struct ip_addr ip;
        char *prefix;
-       unsigned int fatal_logged:1;
+       bool fatal_logged:1;
 };
 
 struct log_connection {
@@ -45,8 +45,8 @@ struct log_connection {
 
        unsigned int pending_count;
 
-       unsigned int master:1;
-       unsigned int handshaked:1;
+       bool master:1;
+       bool handshaked:1;
 };
 
 static struct log_connection *log_connections = NULL;
index ba511a44fe9c8383b4f41f15331b7309c7085b8b..88a4189a4cfa1d8ebdeaf7404e2d046447931b8e 100644 (file)
@@ -68,11 +68,11 @@ struct client_auth_reply {
        /* all the key=value fields returned by passdb */
        const char *const *all_fields;
 
-       unsigned int proxy:1;
-       unsigned int proxy_nopipelining:1;
-       unsigned int temp:1;
-       unsigned int nologin:1;
-       unsigned int authz_failure:1;
+       bool proxy:1;
+       bool proxy_nopipelining:1;
+       bool temp:1;
+       bool nologin:1;
+       bool authz_failure:1;
 };
 
 struct client_vfuncs {
@@ -154,27 +154,27 @@ struct client {
        ARRAY(union login_client_module_context *) module_contexts;
 
        char *virtual_user, *virtual_user_orig, *virtual_auth_user;
-       unsigned int destroyed:1;
-       unsigned int input_blocked:1;
-       unsigned int login_success:1;
-       unsigned int starttls:1;
-       unsigned int tls:1;
-       unsigned int secured:1;
-       unsigned int trusted:1;
-       unsigned int ssl_servername_settings_read:1;
-       unsigned int authenticating:1;
-       unsigned int auth_tried_disabled_plaintext:1;
-       unsigned int auth_tried_unsupported_mech:1;
-       unsigned int auth_try_aborted:1;
-       unsigned int auth_initializing:1;
-       unsigned int auth_process_comm_fail:1;
-       unsigned int proxy_auth_failed:1;
-       unsigned int proxy_nopipelining:1;
-       unsigned int auth_waiting:1;
-       unsigned int auth_user_disabled:1;
-       unsigned int auth_pass_expired:1;
-       unsigned int notified_auth_ready:1;
-       unsigned int notified_disconnect:1;
+       bool destroyed:1;
+       bool input_blocked:1;
+       bool login_success:1;
+       bool starttls:1;
+       bool tls:1;
+       bool secured:1;
+       bool trusted:1;
+       bool ssl_servername_settings_read:1;
+       bool authenticating:1;
+       bool auth_tried_disabled_plaintext:1;
+       bool auth_tried_unsupported_mech:1;
+       bool auth_try_aborted:1;
+       bool auth_initializing:1;
+       bool auth_process_comm_fail:1;
+       bool proxy_auth_failed:1;
+       bool proxy_nopipelining:1;
+       bool auth_waiting:1;
+       bool auth_user_disabled:1;
+       bool auth_pass_expired:1;
+       bool notified_auth_ready:1;
+       bool notified_disconnect:1;
        /* ... */
 };
 
index de74eb41f3efdcb0baa73b2dbf8d6a2519e19e65..fb35e8900926d6fccae1ca7f36dc80b407d395cb 100644 (file)
@@ -54,11 +54,11 @@ struct login_proxy {
 
        proxy_callback_t *callback;
 
-       unsigned int connected:1;
-       unsigned int destroying:1;
-       unsigned int disconnecting:1;
-       unsigned int delayed_disconnect:1;
-       unsigned int num_waiting_connections_updated:1;
+       bool connected:1;
+       bool destroying:1;
+       bool disconnecting:1;
+       bool delayed_disconnect:1;
+       bool num_waiting_connections_updated:1;
 };
 
 static struct login_proxy_state *proxy_state;
index 8f03438ccad30eff105f126df1f3e680a804fccc..b1c6498af16e39630e40558c0895eac112374fbf 100644 (file)
@@ -74,13 +74,13 @@ struct ssl_proxy {
 
        const char *cert_error;
        char *last_error;
-       unsigned int handshaked:1;
-       unsigned int destroyed:1;
-       unsigned int cert_received:1;
-       unsigned int cert_broken:1;
-       unsigned int client_proxy:1;
-       unsigned int flushing:1;
-       unsigned int failed:1;
+       bool handshaked:1;
+       bool destroyed:1;
+       bool cert_received:1;
+       bool cert_broken:1;
+       bool client_proxy:1;
+       bool flushing:1;
+       bool failed:1;
 };
 
 struct ssl_parameters {
index 6cd381bb4b133dd3af1230ebad198def38941d88..d35390a9ca3909deb2676ee33873e00594f56b8f 100644 (file)
@@ -28,7 +28,7 @@ struct service_process {
        /* kill the process if it doesn't send initial status notification */
        struct timeout *to_status;
 
-       unsigned int destroyed:1;
+       bool destroyed:1;
 };
 
 #define SERVICE_PROCESS_IS_INITIALIZED(process) \
index 79aa65f9ef03b189442484f1772983093ab245f5..5d624af1e34eb6b55b47d7f26765ff8f27c908b0 100644 (file)
@@ -110,15 +110,15 @@ struct service {
        time_t last_drop_warning;
 
        /* all processes are in use and new connections are coming */
-       unsigned int listen_pending:1;
+       bool listen_pending:1;
        /* service is currently listening for new connections */
-       unsigned int listening:1;
+       bool listening:1;
        /* TRUE if service has at least one inet_listener */
-       unsigned int have_inet_listeners:1;
+       bool have_inet_listeners:1;
        /* service_login_notify()'s last notification state */
-       unsigned int last_login_full_notify:1;
+       bool last_login_full_notify:1;
        /* service has exited at least once with exit code 0 */
-       unsigned int have_successful_exits:1;
+       bool have_successful_exits:1;
 };
 
 struct service_list {
@@ -143,10 +143,10 @@ struct service_list {
 
        ARRAY(struct service *) services;
 
-       unsigned int destroying:1;
-       unsigned int destroyed:1;
-       unsigned int sigterm_sent:1;
-       unsigned int sigterm_sent_to_log:1;
+       bool destroying:1;
+       bool destroyed:1;
+       bool sigterm_sent:1;
+       bool sigterm_sent_to_log:1;
 };
 
 HASH_TABLE_DEFINE_TYPE(pid_process, void *, struct service_process *);
index 1e4712ea248be706c7873c8fbf35b371ef22ab38..581a4c14405a9dd20731dc463d1db4e8c4685e53 100644 (file)
@@ -57,8 +57,8 @@ struct acl_backend {
 
        struct acl_backend_vfuncs v;
 
-       unsigned int owner:1;
-       unsigned int debug:1;
+       bool owner:1;
+       bool debug:1;
 };
 
 struct acl_mailbox_list_context {
@@ -79,7 +79,7 @@ struct acl_object_list_iter {
 
        struct acl_rights *rights;
        unsigned int idx, count;
-       unsigned int failed:1;
+       bool failed:1;
 };
 
 extern const char *const all_mailbox_rights[];
index beb28072d421df123a43346f60dd58f38563d3d8..91aa82b798930d8f5357711a1fa1a6f400cb30aa 100644 (file)
@@ -77,7 +77,7 @@ struct acl_rights {
        const char *const *neg_rights;
 
        /* These rights are global for all users */
-       unsigned int global:1;
+       bool global:1;
 };
 ARRAY_DEFINE_TYPE(acl_rights, struct acl_rights);
 
index 28003d3c185216a4be7ac053c34180c5e509ac6b..b55239ffa9e9318ab69139a09df81895f78cfc87 100644 (file)
@@ -47,8 +47,8 @@ struct acl_backend_vfile {
        unsigned int acllist_change_counter;
 
        unsigned int cache_secs;
-       unsigned int rebuilding_acllist:1;
-       unsigned int iterating_acllist:1;
+       bool rebuilding_acllist:1;
+       bool iterating_acllist:1;
 };
 
 void acl_vfile_write_rights_list(string_t *dest, const char *const *rights);
index d70701e8617d78b1fe1330aea7b1b67e65051294..da735fecce7eb5f549bda66266991a8683939f20 100644 (file)
@@ -28,7 +28,7 @@ struct acl_lookup_dict_iter {
        ARRAY_TYPE(const_string) iter_values;
        unsigned int iter_idx, iter_value_idx;
 
-       unsigned int failed:1;
+       bool failed:1;
 };
 
 struct acl_lookup_dict *acl_lookup_dict_init(struct mail_user *user)
index dace9e99f7d0692d87977c7315c478388254b4d2..5cd891adc91d7e5a4b8352053cbe1737c89a747b 100644 (file)
@@ -22,8 +22,8 @@ struct acl_mailbox_list_iterate_context {
        struct mailbox_info info;
 
        char sep;
-       unsigned int hide_nonlistable_subscriptions:1;
-       unsigned int simple_star_glob:1;
+       bool hide_nonlistable_subscriptions:1;
+       bool simple_star_glob:1;
 };
 
 static const char *acl_storage_right_names[ACL_STORAGE_RIGHT_COUNT] = {
index 0a3b823813e85aa03a65d1de904a9d5a2c446af5..c71bd0ce19ebdc3d4a9da543d7757ed0ac358234 100644 (file)
@@ -45,8 +45,8 @@ struct expire_mailbox {
 struct expire_transaction_context {
        union mailbox_transaction_module_context module_ctx;
 
-       unsigned int saves:1;
-       unsigned int first_expunged:1;
+       bool saves:1;
+       bool first_expunged:1;
 };
 
 const char *expire_plugin_version = DOVECOT_ABI_VERSION;
index 3420debe2d6c509534c46eb148e6503286f159e7..8fe13c8e8c324af5964f6ac06cdd84d120936f98 100644 (file)
@@ -30,8 +30,8 @@ struct lucene_fts_backend {
 
        struct fts_expunge_log *expunge_log;
 
-       unsigned int dir_created:1;
-       unsigned int updating:1;
+       bool dir_created:1;
+       bool updating:1;
 };
 
 struct lucene_fts_backend_update_context {
index 5d0d3ac3902c842d1e7e8150c3ff3c0a8f32bb33..329dcc7aaba37c0266dd9a902b9e86beee4e427b 100644 (file)
@@ -55,12 +55,12 @@ struct solr_fts_backend_update_context {
        uint32_t last_indexed_uid;
        unsigned int mails_since_flush;
 
-       unsigned int tokenized_input:1;
-       unsigned int last_indexed_uid_set:1;
-       unsigned int body_open:1;
-       unsigned int documents_added:1;
-       unsigned int expunges:1;
-       unsigned int truncate_header:1;
+       bool tokenized_input:1;
+       bool last_indexed_uid_set:1;
+       bool body_open:1;
+       bool documents_added:1;
+       bool expunges:1;
+       bool truncate_header:1;
 };
 
 static const char *solr_escape_chars = "+-&|!(){}[]^\"~*?:\\/ ";
index 3449a8f938f931fed56ee414e04bcec6c464f48a..08edcd8d96fbaa417052eb9e1e7212677acda36a 100644 (file)
@@ -52,7 +52,7 @@ struct solr_connection_post {
 
        struct http_client_request *http_req;
 
-       unsigned int failed:1;
+       bool failed:1;
 };
 
 struct solr_connection {
@@ -68,10 +68,10 @@ struct solr_connection {
        struct istream *payload;
        struct io *io;
 
-       unsigned int debug:1;
-       unsigned int posting:1;
-       unsigned int xml_failed:1;
-       unsigned int http_ssl:1;
+       bool debug:1;
+       bool posting:1;
+       bool xml_failed:1;
+       bool http_ssl:1;
 };
 
 static int solr_xml_parse(struct solr_connection *conn,
index efe93fe0b7627aa3e9cdcdeb7c7bcf1a88232556..b079554916c50a9655ae7c56b99c6d176eceee77 100644 (file)
@@ -56,12 +56,12 @@ struct squat_node {
        /* TRUE = children.data contains our children.
           FALSE = children.offset contains offset to our children in the
           index file. */
-       unsigned int children_not_mapped:1;
+       bool children_not_mapped:1;
        /* When allocating our children, use a sequential array. */
-       unsigned int want_sequential:1;
+       bool want_sequential:1;
        /* This node's children are in a sequential array, meaning that the
           first SEQUENTIAL_COUNT children have chars[n] = n. */
-       unsigned int have_sequential:1;
+       bool have_sequential:1;
 
        /* Number of UIDs that exists in parent node but not in this one
           (i.e. number of UIDs [0..next_uid-1] not in this node's uidlist).
@@ -138,7 +138,7 @@ struct squat_trie {
        unsigned int default_partial_len;
        unsigned int default_full_len;
 
-       unsigned int corrupted:1;
+       bool corrupted:1;
 };
 
 #define SQUAT_PACK_MAX_SIZE ((sizeof(uint32_t) * 8 + 7) / 7)
index c24aacb0325b9acd5106eded696ac025fc254952..91111aa4f83649c5f76b5efbacd1e1c889822ebf 100644 (file)
@@ -39,7 +39,7 @@ struct squat_trie_build_context {
        struct dotlock *dotlock;
 
        uint32_t first_uid;
-       unsigned int compress_nodes:1;
+       bool compress_nodes:1;
 };
 
 struct squat_trie_iterate_node {
index 566e9efd10a5fca4313407b8e2ecd275546afc5d..cbd71ac84392edd465fda2a5843b38610e2c17f0 100644 (file)
@@ -27,7 +27,7 @@
 
 struct uidlist_list {
        unsigned int uid_count:31;
-       unsigned int uid_begins_with_pointer:1;
+       bool uid_begins_with_pointer:1;
        uint32_t uid_list[UIDLIST_LIST_SIZE];
 };
 
@@ -54,8 +54,8 @@ struct squat_uidlist {
        const uint32_t *cur_block_end_indexes;
 
        size_t max_size;
-       unsigned int corrupted:1;
-       unsigned int building:1;
+       bool corrupted:1;
+       bool building:1;
 };
 
 struct squat_uidlist_build_context {
@@ -69,7 +69,7 @@ struct squat_uidlist_build_context {
        uint32_t list_start_idx;
 
        struct squat_uidlist_file_header build_hdr;
-       unsigned int need_reopen:1;
+       bool need_reopen:1;
 };
 
 struct squat_uidlist_rebuild_context {
index 4fd12e9006afb03a468cb777cf36ea380ea8ec3b..a2eac7a099a1b8e5b10c95188f9ac7c4d9434313 100644 (file)
@@ -76,7 +76,7 @@ struct fts_backend {
        struct fts_backend_vfuncs v;
        struct mail_namespace *ns;
 
-       unsigned int updating:1;
+       bool updating:1;
 };
 
 struct fts_backend_update_context {
@@ -85,8 +85,8 @@ struct fts_backend_update_context {
 
        struct mailbox *cur_box, *backend_box;
 
-       unsigned int build_key_open:1;
-       unsigned int failed:1;
+       bool build_key_open:1;
+       bool failed:1;
 };
 
 struct fts_index_header {
index 884132ac9a549b83ad1d9ab8574647ebd0ce8266..30aa2c8386120d1143869cc0a680d6c6743f6bcc 100644 (file)
@@ -30,8 +30,8 @@ struct fts_indexer_context {
        int fd;
        struct istream *input;
 
-       unsigned int notified:1;
-       unsigned int failed:1;
+       bool notified:1;
+       bool failed:1;
 };
 
 int fts_indexer_cmd(struct mail_user *user, const char *cmd,
index 31468c027f15a2512abc722d88425d66b5cdab01..32dcd309ecf31e0d20d4819d79d969f2af050c69 100644 (file)
@@ -48,16 +48,16 @@ struct fts_transaction_context {
        uint32_t next_index_seq;
        uint32_t highest_virtual_uid;
 
-       unsigned int precached:1;
-       unsigned int mails_saved:1;
-       unsigned int failed:1;
+       bool precached:1;
+       bool mails_saved:1;
+       bool failed:1;
 };
 
 struct fts_mail {
        union mail_module_context module_ctx;
        char score[30];
 
-       unsigned int virtual_mail:1;
+       bool virtual_mail:1;
 };
 
 static MODULE_CONTEXT_DEFINE_INIT(fts_storage_module,
index 620b8e3552542bd4f55da4073d149421f424c7ca..bfc99993bbec794d4fbc8617f46a6d6183085ffe 100644 (file)
@@ -35,10 +35,10 @@ struct fts_search_context {
 
        struct fts_indexer_context *indexer_ctx;
 
-       unsigned int virtual_mailbox:1;
-       unsigned int fts_lookup_success:1;
-       unsigned int indexing_timed_out:1;
-       unsigned int enforced:1;
+       bool virtual_mailbox:1;
+       bool fts_lookup_success:1;
+       bool indexing_timed_out:1;
+       bool enforced:1;
 };
 
 /* Figure out if we want to use full text search indexes and update
index 322d8b68222ac51da491385b3be6cf45e929879a..1b25171e644c7ebe396e33a41f06077a674c7528 100644 (file)
@@ -39,8 +39,8 @@ struct lazy_expunge_mail_user {
 struct lazy_expunge_mailbox_list {
        union mailbox_list_module_context module_ctx;
 
-       unsigned int allow_rename:1;
-       unsigned int internal_namespace:1;
+       bool allow_rename:1;
+       bool internal_namespace:1;
 };
 
 struct lazy_expunge_transaction {
index e71356737151ba5cb31ab73be82a95ec25c1d5bb..1321aab817d4740ac4b5970c82cc35dc073e2f17 100644 (file)
@@ -24,7 +24,7 @@
 struct msg_map_common {
        /* sha1(header) - set only when needed */
        unsigned char hdr_sha1[SHA1_RESULTLEN];
-       unsigned int hdr_sha1_set:1;
+       bool hdr_sha1_set:1;
 };
 
 struct pop3_uidl_map {
@@ -53,10 +53,10 @@ struct pop3_migration_mail_storage {
        const char *pop3_box_vname;
        ARRAY(struct pop3_uidl_map) pop3_uidl_map;
 
-       unsigned int all_mailboxes:1;
-       unsigned int pop3_all_hdr_sha1_set:1;
-       unsigned int ignore_missing_uidls:1;
-       unsigned int skip_size_check:1;
+       bool all_mailboxes:1;
+       bool pop3_all_hdr_sha1_set:1;
+       bool ignore_missing_uidls:1;
+       bool skip_size_check:1;
 };
 
 struct pop3_migration_mailbox {
@@ -67,10 +67,10 @@ struct pop3_migration_mailbox {
 
        struct mail_cache_field cache_field;
 
-       unsigned int cache_field_registered:1;
-       unsigned int uidl_synced:1;
-       unsigned int uidl_sync_failed:1;
-       unsigned int uidl_ordered:1;
+       bool cache_field_registered:1;
+       bool uidl_synced:1;
+       bool uidl_sync_failed:1;
+       bool uidl_ordered:1;
 };
 
 /* NOTE: these headers must be sorted */
index b3c15be3a8827f352fe918b45952b747712607b1..c1a3e45e3e85f4d00bd84325267f29e9de6fe3f5 100644 (file)
@@ -73,9 +73,9 @@ struct fs_quota_root {
        gid_t gid;
        struct fs_quota_mountpoint *mount;
 
-       unsigned int inode_per_mail:1;
-       unsigned int user_disabled:1;
-       unsigned int group_disabled:1;
+       bool inode_per_mail:1;
+       bool user_disabled:1;
+       bool group_disabled:1;
 #ifdef FS_QUOTA_NETBSD
        struct quotahandle *qh;
 #endif
index 7c7a23f7a582008021dececd13389e6315c11b94..1dcd94f58682bb2b1d9d1f6e6cec4110fa250e8c 100644 (file)
@@ -33,7 +33,7 @@ struct maildir_quota_root {
        time_t recalc_last_stamp;
        off_t last_size;
 
-       unsigned int limits_initialized:1;
+       bool limits_initialized:1;
 };
 
 struct maildir_list_context {
index 6ac87af181bd53fde903b6e0e9f1cb32e6d8bbd3..c28207f195e0eec6fde7613cbe537bff8a298e9e 100644 (file)
@@ -26,9 +26,9 @@ struct quota_settings {
                          uoff_t size, bool *too_large_r);
 
        const char *quota_exceeded_msg;
-       unsigned int debug:1;
-       unsigned int initialized:1;
-       unsigned int vsizes:1;
+       bool debug:1;
+       bool initialized:1;
+       bool vsizes:1;
 };
 
 struct quota_rule {
@@ -39,13 +39,13 @@ struct quota_rule {
        int bytes_percent, count_percent;
 
        /* Don't include this mailbox in quota */
-       unsigned int ignore:1;
+       bool ignore:1;
 };
 
 struct quota_warning_rule {
        struct quota_rule rule;
        const char *command;
-       unsigned int reverse:1;
+       bool reverse:1;
 };
 
 struct quota_backend_vfuncs {
@@ -100,7 +100,7 @@ struct quota_root_settings {
        struct quota_rule grace_rule;
 
        /* Limits in default_rule override backend's quota limits */
-       unsigned int force_default_rule:1;
+       bool force_default_rule:1;
 };
 
 struct quota_root {
@@ -136,22 +136,22 @@ struct quota_root {
        const char *quota_over_flag;
 
        /* don't enforce quota when saving */
-       unsigned int no_enforcing:1;
+       bool no_enforcing:1;
        /* quota is automatically updated. update() should be called but the
           bytes/count won't be used. */
-       unsigned int auto_updating:1;
+       bool auto_updating:1;
        /* If user has unlimited quota, disable quota tracking */
-       unsigned int disable_unlimited_tracking:1;
+       bool disable_unlimited_tracking:1;
        /* Set while quota is being recalculated to avoid recursion. */
-       unsigned int recounting:1;
+       bool recounting:1;
        /* Quota root is hidden (to e.g. IMAP GETQUOTAROOT) */
-       unsigned int hidden:1;
+       bool hidden:1;
        /* Is quota_over_flag* initialized yet? */
-       unsigned int quota_over_flag_initialized:1;
+       bool quota_over_flag_initialized:1;
        /* Is user currently over quota? */
-       unsigned int quota_over_flag_status:1;
+       bool quota_over_flag_status:1;
        /* Did we already check quota_over_flag correctness? */
-       unsigned int quota_over_flag_checked:1;
+       bool quota_over_flag_checked:1;
 };
 
 struct quota_transaction_context {
@@ -177,11 +177,11 @@ struct quota_transaction_context {
        struct mail *tmp_mail;
        enum quota_recalculate recalculate;
 
-       unsigned int limits_set:1;
-       unsigned int failed:1;
-       unsigned int sync_transaction:1;
+       bool limits_set:1;
+       bool failed:1;
+       bool sync_transaction:1;
        /* TRUE if all roots have auto_updating=TRUE */
-       unsigned int auto_updating:1;
+       bool auto_updating:1;
 };
 
 /* Register storage to all user's quota roots. */
index 14270d8df28c2b72142a8f320896fe4b3b44f223..91e364c587d883e035aaaf559bfaf63b05ece75f 100644 (file)
@@ -33,8 +33,8 @@ struct quota_mailbox {
        ARRAY(uoff_t) expunge_sizes;
        unsigned int prev_idx;
 
-       unsigned int recalculate:1;
-       unsigned int sync_transaction_expunge:1;
+       bool recalculate:1;
+       bool sync_transaction_expunge:1;
 };
 
 struct quota_user_module quota_user_module =
index 84fe7dd7860fb19772258d7f35297739c50f478c..84e6d6eddd0127f3f7525cb8ab5120ddea06fad7 100644 (file)
@@ -20,7 +20,7 @@ struct virtual_mail {
        ARRAY(struct mail *) backend_mails;
 
        /* mail is lost if backend_mail doesn't point to correct mail */
-       unsigned int cur_lost:1;
+       bool cur_lost:1;
 };
 
 struct mail *
index c777091410f9b5b92196a5e63adcbcfc5527e5a9..e847cd31f81a00e0f62d2b0abe4c3c667445acfa 100644 (file)
@@ -102,15 +102,15 @@ struct virtual_backend_box {
        /* mailbox metadata matching */
        const char *metadata_entry, *metadata_value;
 
-       unsigned int open_tracked:1;
-       unsigned int open_failed:1;
-       unsigned int sync_seen:1;
-       unsigned int wildcard:1;
-       unsigned int clear_recent:1;
-       unsigned int negative_match:1;
-       unsigned int uids_nonsorted:1;
-       unsigned int search_args_initialized:1;
-       unsigned int deleted:1;
+       bool open_tracked:1;
+       bool open_failed:1;
+       bool sync_seen:1;
+       bool wildcard:1;
+       bool clear_recent:1;
+       bool negative_match:1;
+       bool uids_nonsorted:1;
+       bool search_args_initialized:1;
+       bool deleted:1;
 };
 ARRAY_DEFINE_TYPE(virtual_backend_box, struct virtual_backend_box *);
 
@@ -143,12 +143,12 @@ struct virtual_mailbox {
        ARRAY_TYPE(mailbox_virtual_patterns) list_include_patterns;
        ARRAY_TYPE(mailbox_virtual_patterns) list_exclude_patterns;
 
-       unsigned int uids_mapped:1;
-       unsigned int sync_initialized:1;
-       unsigned int inconsistent:1;
-       unsigned int have_guid_flags_set:1;
-       unsigned int have_guids:1;
-       unsigned int have_save_guids:1;
+       bool uids_mapped:1;
+       bool sync_initialized:1;
+       bool inconsistent:1;
+       bool have_guid_flags_set:1;
+       bool have_guids:1;
+       bool have_save_guids:1;
 };
 
 extern MODULE_CONTEXT_DEFINE(virtual_storage_module,
index 5b31212cf8a717f751e8232b3ac062eba560820c..c75f2e29e103d8ae8d06b9232b8aa506809a4a7d 100644 (file)
@@ -44,10 +44,10 @@ struct virtual_sync_context {
        enum mailbox_sync_flags flags;
        uint32_t uid_validity;
 
-       unsigned int ext_header_changed:1;
-       unsigned int ext_header_rewrite:1;
-       unsigned int expunge_removed:1;
-       unsigned int index_broken:1;
+       bool ext_header_changed:1;
+       bool ext_header_rewrite:1;
+       bool expunge_removed:1;
+       bool index_broken:1;
 };
 
 static void virtual_sync_backend_box_deleted(struct virtual_sync_context *ctx,
index 6b6fc282d9150276e5395918ecf30d0a1b69a487..c437bf964998d79eddac1054c89853fcbe56cef1 100644 (file)
@@ -96,12 +96,12 @@ struct client {
        /* Module-specific contexts. */
        ARRAY(union pop3_module_context *) module_contexts;
 
-       unsigned int disconnected:1;
-       unsigned int deleted:1;
-       unsigned int waiting_input:1;
-       unsigned int anvil_sent:1;
-       unsigned int message_uidls_save:1;
-       unsigned int delete_success:1;
+       bool disconnected:1;
+       bool deleted:1;
+       bool waiting_input:1;
+       bool anvil_sent:1;
+       bool message_uidls_save:1;
+       bool delete_success:1;
 };
 
 struct pop3_module_register {
index 1adebb786bd80515959a4c4b0a858f79142ed2fa..1f7e4d93570c51ef9049f3a6d865195c5f5d9dbf 100644 (file)
@@ -30,8 +30,8 @@ struct dsync_client {
        void *context;
 
        time_t last_connect_failure;
-       unsigned int handshaked:1;
-       unsigned int cmd_sent:1;
+       bool handshaked:1;
+       bool cmd_sent:1;
 };
 
 struct dsync_client *
index e70b4e8fe2c3b36d3f586f140a56092ad30d37ea..0b9eedf96de742e471a4c609868ba2dff711b53a 100644 (file)
@@ -26,8 +26,8 @@ struct notify_connection {
 
        struct replicator_queue *queue;
 
-       unsigned int version_received:1;
-       unsigned int destroyed:1;
+       bool version_received:1;
+       bool destroyed:1;
 };
 
 struct notify_sync_request {
index abc6dcdf62a93263c0d8832118dcc5f205a811a9..bbbfd12efd269d7dbba3b3e8aa1878d457729310 100644 (file)
@@ -21,7 +21,7 @@ struct replicator_brain {
 
        ARRAY_TYPE(dsync_client) dsync_clients;
 
-       unsigned int deinitializing:1;
+       bool deinitializing:1;
 };
 
 static void replicator_brain_fill(struct replicator_brain *brain);
index e48dfa6f313ecf0bfaf486a214b9639cc8561846..a9b3b36752dc95169efafab60fe8ba785b929203 100644 (file)
@@ -17,11 +17,11 @@ struct replicator_user {
 
        enum replication_priority priority;
        /* User isn't currently in replication queue */
-       unsigned int popped:1;
+       bool popped:1;
        /* Last replication sync failed */
-       unsigned int last_sync_failed:1;
+       bool last_sync_failed:1;
        /* Force a full sync on the next replication */
-       unsigned int force_full_sync:1;
+       bool force_full_sync:1;
 };
 
 typedef void replicator_sync_callback_t(bool success, void *context);