]> git.ipfire.org Git - thirdparty/dovecot/core.git/commitdiff
global: uint32_t:1 -> bool:1
authorTimo Sirainen <timo.sirainen@dovecot.fi>
Sun, 5 Jun 2016 13:30:47 +0000 (16:30 +0300)
committerTimo Sirainen <timo.sirainen@dovecot.fi>
Mon, 6 Jun 2016 12:37:05 +0000 (15:37 +0300)
They were uint32_t because I wanted to be sure that there wouldn't be any
padding added to the struct. But this should be true also with bool:1.

src/auth/auth-cache.h
src/lib-storage/index/index-sort-string.c

index 1ec2684897a229244f748a141cc901977a40fd72..5cd3f8d4b59ebe28d38024ca769c580250c96b94 100644 (file)
@@ -8,7 +8,7 @@ struct auth_cache_node {
        /* Total number of bytes used by this node */
        uint32_t alloc_size:31;
        /* TRUE if the user gave the correct password the last time. */
-       uint32_t last_success:1;
+       bool last_success:1;
 
        char data[4]; /* key \0 value \0 */
 };
index 4ed8b8c8e3c741c3713343a6d59b0576b03b457b..162513735cf8d492a79fd5e8fee4eb7beefb0e9e 100644 (file)
@@ -17,9 +17,9 @@
 
 struct mail_sort_node {
        uint32_t seq:29;
-       uint32_t wanted:1;
-       uint32_t no_update:1;
-       uint32_t sort_id_changed:1;
+       bool wanted:1;
+       bool no_update:1;
+       bool sort_id_changed:1;
        uint32_t sort_id;
 };
 ARRAY_DEFINE_TYPE(mail_sort_node, struct mail_sort_node);