]> git.ipfire.org Git - thirdparty/dovecot/core.git/commitdiff
global: Remove unused macros
authorTimo Sirainen <timo.sirainen@open-xchange.com>
Mon, 28 Feb 2022 11:11:35 +0000 (06:11 -0500)
committeraki.tuomi <aki.tuomi@open-xchange.com>
Fri, 18 Mar 2022 06:27:23 +0000 (06:27 +0000)
44 files changed:
src/anvil/penalty.c
src/auth/auth-worker-client.c
src/auth/mech-digest-md5.c
src/auth/mech-winbind.c
src/director/director-connection.c
src/doveadm/doveadm-mail-server.c
src/imap-urlauth/imap-urlauth-client.c
src/imap-urlauth/imap-urlauth-worker.c
src/indexer/worker-pool.c
src/lib-compression/compression.h
src/lib-dcrypt/istream-decrypt.c
src/lib-dns/test-dns-lookup.c
src/lib-fs/fs-sis-queue.c
src/lib-index/mail-index-lock.c
src/lib-index/mail-index-strmap.c
src/lib-index/mail-index-sync-update.c
src/lib-index/mail-index-write.c
src/lib-ldap/ldap-private.h
src/lib-mail/message-part-serialize.c
src/lib-smtp/smtp-client-private.h
src/lib-smtp/smtp-client.c
src/lib-smtp/smtp-server-private.h
src/lib-sql/driver-sqlpool.c
src/lib-storage/index/dbox-common/dbox-storage.h
src/lib-storage/index/dbox-multi/mdbox-map.c
src/lib-storage/index/maildir/maildir-storage.c
src/lib-storage/index/maildir/maildir-storage.h
src/lib-storage/index/maildir/maildir-sync.c
src/lib-storage/index/mbox/mbox-storage.c
src/lib-storage/mail-duplicate.h
src/lib-storage/mail-storage-service.c
src/lib/file-lock.h
src/lib/iostream-rawlog-private.h
src/lib/istream-seekable.c
src/lib/test-cpu-limit.c
src/lib/unichar.c
src/lmtp/lmtp-client.h
src/log/log-connection.c
src/login-common/login-proxy.c
src/plugins/acl/acl-cache.c
src/plugins/acl/acl-mailbox-list.c
src/plugins/imap-zlib/imap-zlib-plugin.c
src/plugins/quota/test-quota-util.c
src/plugins/replication/replication-plugin.c

index 2ab6da16aa5f864cb286335ed8e07d5213e8e8d5..b7789c43734d0eff365221d0853c1ccd000b3558 100644 (file)
@@ -16,7 +16,6 @@
 #include <time.h>
 
 #define PENALTY_DEFAULT_EXPIRE_SECS (60*60)
-#define PENALTY_CHECKSUM_SAVE_COUNT
 #define CHECKSUM_VALUE_COUNT 2
 #define CHECKSUM_VALUE_PTR_COUNT 10
 
index ff88bc2ed95078d19c640539119cc723e2f967dd..d9c1fdfce2dff90bfe488fb8d5c0f3fc95fba63f 100644 (file)
@@ -20,7 +20,6 @@
 #define OUTBUF_THROTTLE_SIZE (1024*10)
 
 #define CLIENT_STATE_HANDSHAKE "handshaking"
-#define CLIENT_STATE_ITER "iterating users"
 #define CLIENT_STATE_IDLE "idling"
 #define CLIENT_STATE_STOP "waiting for shutdown"
 
index d7f43834400728cb16dfcd9b504e6508d9c69d0e..06553d00ec70f51d792bd733478d04840cb5f99d 100644 (file)
@@ -15,8 +15,6 @@
 #include "passdb.h"
 
 
-#define MAX_REALM_LEN 64
-
 /* Linear whitespace */
 #define IS_LWS(c) ((c) == ' ' || (c) == '\t')
 
index d2525db9bdc1d0e601009bd39d4fd1715bbefea2..fa2fe152fa49c2666079ef086ecc7439de9ace5f 100644 (file)
@@ -20,8 +20,6 @@
 #include <unistd.h>
 #include <sys/wait.h>
 
-#define DEFAULT_WINBIND_HELPER_PATH "/usr/bin/ntlm_auth"
-
 enum helper_result {
        HR_OK   = 0,    /* OK or continue */
        HR_FAIL = -1,   /* authentication failed */
index 697bd6487f622d828b617f1b39df58461cb85ef0..253d3dab8defff81eb30df1cbb8f049d8a8d5bb5 100644 (file)
@@ -79,7 +79,6 @@
 #define DIRECTOR_RECONNECT_AFTER_WRONG_CONNECT_MSECS 1000
 #define DIRECTOR_WAIT_DISCONNECT_SECS 10
 #define DIRECTOR_HANDSHAKE_WARN_SECS 29
-#define DIRECTOR_HANDSHAKE_BYTES_LOG_MIN_SECS (60*30)
 #define DIRECTOR_MAX_SYNC_SEQ_DUPLICATES 4
 /* If we receive SYNCs with a timestamp this many seconds higher than the last
    valid received SYNC timestamp, assume that we lost the director's restart
index 5c71b0e0e1179d133b5f514ca3f542c9285503c9..f9a8f752be39b3d09303556c5eee25c14e33eb7c 100644 (file)
@@ -19,7 +19,6 @@
 #include "doveadm-print.h"
 #include "doveadm-mail.h"
 
-#define DOVEADM_SERVER_CONNECTIONS_MAX 4
 #define DOVEADM_SERVER_QUEUE_MAX 16
 
 #define DOVEADM_MAIL_SERVER_FAILED() \
index d3f4ebc5490f63671b2442f395be124ac22434b6..f1794d944a9bb8255f39ca83876cbbe89c8dbd3f 100644 (file)
@@ -33,8 +33,6 @@
 /* Disconnect client after idling this many milliseconds */
 #define CLIENT_IDLE_TIMEOUT_MSECS (10*60*1000)
 
-#define USER_EXECUTABLE "imap-urlauth-worker"
-
 #define IS_STANDALONE() \
         (getenv(MASTER_IS_PARENT_ENV) == NULL)
 
index 4dc413a4316812f31c6a3a96b578021a4c045874..3edf6771511c6fddf6c01c77ac1b4e2254f06703 100644 (file)
@@ -31,8 +31,6 @@
 #include <unistd.h>
 #include <sysexits.h>
 
-#define MAX_CTRL_HANDSHAKE 255
-
 /* max. length of input lines (URLs) */
 #define MAX_INBUF_SIZE 2048
 
index 5b667706f810ffb64bdb5eef9ea10609fee41a96..9d7ca5ab1f801302188736919b3425a478f3f643 100644 (file)
@@ -8,8 +8,6 @@
 #include "worker-connection.h"
 #include "worker-pool.h"
 
-#define MAX_WORKER_IDLE_SECS (60*5)
-
 struct worker_pool {
        char *socket_path;
        indexer_status_callback_t *callback;
index 60d58bfb3707fbce2e709e714601a81005cfbe9a..d78e44f2b51f9a6ec6394217b694b788a4f6e05f 100644 (file)
@@ -7,11 +7,6 @@ enum istream_decompress_flags {
        ISTREAM_DECOMPRESS_FLAG_TRY = BIT(0),
 };
 
-/* Compressed input is always detected once at maximum this many bytes have
-   been read. This value must be smaller than a typical istream max buffer
-   size. */
-#define COMPRESSION_HDR_MAX_SIZE 128
-
 struct compression_handler {
        const char *name;
        const char *ext;
index be550fb1b42405e97ccdb331906e2f631b6ec4bd..ac40a0bcc0dbb049aeabecb18bf4476acc282b21 100644 (file)
@@ -17,8 +17,6 @@
 
 #include <arpa/inet.h>
 
-#define ISTREAM_DECRYPT_READ_FIRST 15
-
 struct decrypt_istream_snapshot {
        struct istream_snapshot snapshot;
        struct decrypt_istream *dstream;
index bba7432373678b4e7192f40459fed3c8c47c82a7..db7092336736d7d63a43381dbca5958fe4776583 100644 (file)
@@ -14,7 +14,6 @@
 #include <unistd.h>
 
 #define TEST_SOCKET_NAME ".test-dns-server"
-#define TEST_CACHE_TTL 4
 
 static const struct {
        const char *name;
index 8ad7d98086c92515f2c9686bbad2aaa826cdba7c..d1be57d31c9b013b8129aa67b1f61c5ab50fe43a 100644 (file)
@@ -6,8 +6,6 @@
 #include "ostream.h"
 #include "fs-sis-common.h"
 
-#define QUEUE_DIR_NAME "queue"
-
 struct sis_queue_fs {
        struct fs fs;
        char *queue_dir;
index cdf62e4651fac6139fa3c6c06726615d2f27ad2b..99d02381a2f03795a0c141d7f07bccde96cd563e 100644 (file)
@@ -21,8 +21,6 @@
 #include "nfs-workarounds.h"
 #include "mail-index-private.h"
 
-#define MAIL_INDEX_SHARED_LOCK_TIMEOUT 120
-
 int mail_index_lock_fd(struct mail_index *index, const char *path, int fd,
                       int lock_type, unsigned int timeout_secs,
                       struct file_lock **lock_r)
index 1287c7386dcc75d7d89f503c4aab913a3de37097..f10f0167db401ae086a80b8d7069c25bbd310cc9 100644 (file)
@@ -77,9 +77,6 @@ struct mail_index_strmap_hash_key {
        uint32_t crc32;
 };
 
-/* number of bytes required to store one string idx */
-#define STRMAP_FILE_STRIDX_SIZE (sizeof(uint32_t)*2)
-
 /* renumber the string indexes when highest string idx becomes larger than
    <number of indexes>*STRMAP_FILE_MAX_STRIDX_MULTIPLIER */
 #define STRMAP_FILE_MAX_STRIDX_MULTIPLIER 2
index 0c3799564339cc8df8df75369dfa278719d81882..c1dfe1c36f562bca7eb2d7ea1d014252a808113c 100644 (file)
@@ -481,9 +481,6 @@ static int sync_flag_update(const struct mail_transaction_flag_update *u,
 static int sync_header_update(const struct mail_transaction_header_update *u,
                              struct mail_index_sync_map_ctx *ctx)
 {
-#define MAIL_INDEX_HEADER_UPDATE_FIELD_IN_RANGE(u, field) \
-       ((u)->offset <= offsetof(struct mail_index_header, field) && \
-        (u)->offset + (u)->size > offsetof(struct mail_index_header, field))
        struct mail_index_map *map = ctx->view->map;
        uint32_t orig_log_file_tail_offset = map->hdr.log_file_tail_offset;
        uint32_t orig_next_uid = map->hdr.next_uid;
index 9fb5784480bf140dec91264f7ab16d02a96170a6..e5157deb3231e163917ddc785437f8022322e6d0 100644 (file)
 
 #include <stdio.h>
 
-#define MAIL_INDEX_MIN_UPDATE_SIZE 1024
-/* if we're updating >= count-n messages, recreate the index */
-#define MAIL_INDEX_MAX_OVERWRITE_NEG_SEQ_COUNT 10
-
 static int mail_index_create_backup(struct mail_index *index)
 {
        const char *backup_path, *tmp_backup_path;
index fa724f40df966e985ac9dab3899e6aac4ce085f1..9f3b20c5aec31314f10e85abcad1eb241ac6a637 100644 (file)
@@ -6,10 +6,6 @@
 
 #include <ldap.h>
 
-#define DOVE_LDAP_CONTINUE 0
-#define DOVE_LDAP_COMPLETE 1
-#define DOVE_LDAP_REQUEUE 2
-
 struct ldap_connection;
 struct ldap_result;
 
index 23f3a01c8b58bc9c494484c827bd2aafe3947a64..8d26a7132aa92f19b5588f25f6dbef51829c66ea 100644 (file)
@@ -28,9 +28,6 @@
 
 */
 
-#define MINIMUM_SERIALIZED_SIZE \
-       (sizeof(unsigned int) + sizeof(uoff_t) * 4)
-
 struct deserialize_context {
        pool_t pool;
        const unsigned char *data, *end;
index 2fbb81ddb01c72b2a93948fd896342a6a7d354f9..842eecc59cfc282b8582715e924bebca6174277a 100644 (file)
@@ -10,8 +10,6 @@
 #include "smtp-client-transaction.h"
 #include "smtp-client-connection.h"
 
-#define SMTP_CLIENT_DATA_CHUNK_SIZE IO_BLOCK_SIZE
-
 struct smtp_client_command {
        pool_t pool;
        int refcount;
index 653dd0ef189dd251ad3a90c29ad4fda1adb5fd80..9a55126fab8887dbdfddd0032c32e2542d32656f 100644 (file)
@@ -15,9 +15,6 @@
 
 #include "smtp-client-private.h"
 
-#define SMTP_DEFAULT_PORT 80
-#define SSMTP_DEFAULT_PORT 465
-
 static struct event_category event_category_smtp_client = {
        .name = "smtp-client"
 };
index 7a923365b4252f57e866a96726a45803e9468677..3ee7e446e67a51748b567ff9b0a8f6d2788e0ea0 100644 (file)
@@ -5,9 +5,6 @@
 
 #include "smtp-server.h"
 
-#define SMTP_SERVER_COMMAND_POOL_MAX              (8 * 1024)
-
-#define SMTP_SERVER_DEFAULT_MAX_COMMAND_LINE      (4 * 1024)
 #define SMTP_SERVER_DEFAULT_MAX_BAD_COMMANDS      10
 #define SMTP_SERVER_DEFAULT_MAX_SIZE_EXCESS_LIMIT (1024*1024)
 
index 553b2a03779275ec291d1cc4136935a2f31000c2..987082f5fd9bed120a92e833eff947cdc910a807 100644 (file)
@@ -8,8 +8,6 @@
 
 #include <time.h>
 
-#define QUERY_TIMEOUT_SECS 6
-
 /* sqlpool events are separate from category:sql, because
    they are usually not very interesting, and would only
    make logging too noisy. They can be enabled explicitly.
index af085df6babf9e1aefc5a01518a6f593038d821c..8e1aee28f25c2aa71fb5e458723057fde5304300 100644 (file)
@@ -14,7 +14,6 @@ struct dbox_save_context;
 #define DBOX_ALT_SYMLINK_NAME "dbox-alt-root"
 
 #define DBOX_MAILBOX_DIR_NAME "mailboxes"
-#define DBOX_TRASH_DIR_NAME "trash"
 #define DBOX_MAILDIR_NAME "dbox-Mails"
 
 /* Delete temp files having ctime older than this. */
index 513db02c099760e04b49c40ff058ad27f3532598..6ee237e26475b9d2882dda2e14075da655552c93 100644 (file)
@@ -15,9 +15,6 @@
 
 #define MAX_BACKWARDS_LOOKUPS 10
 
-#define DBOX_FORCE_PURGE_MIN_BYTES (1024*1024*10)
-#define DBOX_FORCE_PURGE_MIN_RATIO 0.5
-
 #define MAP_STORAGE(map) (&(map)->storage->storage.storage)
 
 struct mdbox_map_transaction_context {
index e65579ff1f8252a86b94ff6702442b8c41f8449c..3ac909a2e583a277d9e9629c9d9ed61a9e33a325 100644 (file)
@@ -15,8 +15,6 @@
 
 #include <sys/stat.h>
 
-#define MAILDIR_LIST_CONTEXT(obj) \
-       MODULE_CONTEXT(obj, maildir_mailbox_list_module)
 #define MAILDIR_SUBFOLDER_FILENAME "maildirfolder"
 
 struct maildir_mailbox_list_context {
index da92866a4743bbe1b2c07c6e705d048fb378a578..42efb5b0b8113b733e43500d25238b8ad99ef506 100644 (file)
@@ -14,7 +14,6 @@
 #define MAILDIR_FLAGS_SEP ','
 
 #define MAILDIR_INFO_SEP_S ":"
-#define MAILDIR_EXTRA_SEP_S ","
 #define MAILDIR_FLAGS_SEP_S ","
 
 /* ":2," is the standard flags separator */
index 08144155b694ef762244d1b2a47591fef1cee060..302ac329c8dc52c4e59e2aee7b29951b6744a2d9 100644 (file)
 #include <dirent.h>
 #include <sys/stat.h>
 
-#define MAILDIR_FILENAME_FLAG_FOUND 128
-
 /* When rename()ing many files from new/ to cur/, it's possible that next
    readdir() skips some files. we don't of course wish to lose them, so we
    go and rescan the new/ directory again from beginning until no files are
index 4b2bb359f9b0f79e51e541f1b8211c09bf0abfa0..fb191621602885a38f88088828226ddf3f47ae90 100644 (file)
 /* How often to touch the dotlock file when using KEEP_LOCKED flag */
 #define MBOX_LOCK_TOUCH_MSECS (10*1000)
 
-/* Assume that if atime < mtime, there are new mails. If it's good enough for
-   UW-IMAP, it's good enough for us. */
-#define STAT_GET_MARKED(st) \
-       ((st).st_size == 0 ? MAILBOX_UNMARKED : \
-        (st).st_atime < (st).st_mtime ? MAILBOX_MARKED : MAILBOX_UNMARKED)
-
 #define MBOX_LIST_CONTEXT(obj) \
        MODULE_CONTEXT_REQUIRE(obj, mbox_mailbox_list_module)
 
index c41489338585254e605bc5f7ea3b94750c45ec16..b24fdce04275b8c9f34c1aa2bc579a306723c9e4 100644 (file)
@@ -20,8 +20,6 @@ enum mail_duplicate_check_result {
        MAIL_DUPLICATE_CHECK_RESULT_DEADLOCK,
 };
 
-#define MAIL_DUPLICATE_DEFAULT_KEEP (3600 * 24)
-
 struct mail_duplicate_transaction *
 mail_duplicate_transaction_begin(struct mail_duplicate_db *db);
 void mail_duplicate_transaction_rollback(
index 46c8dccfb82f855ea0e19629175b3963f3c58c06..eee7ae8f1d36c6c5a8a57ef45e6a40f6bd5c543e 100644 (file)
@@ -39,9 +39,6 @@
 #define MAX_TIME_BACKWARDS_SLEEP_MSECS  (5*1000)
 #define MAX_NOWARN_FORWARD_MSECS        (10*1000)
 
-#define ERRSTR_INVALID_USER_SETTINGS \
-       "Invalid user settings. Refer to server log for more information."
-
 struct mail_storage_service_privileges {
        uid_t uid;
        gid_t gid;
index 0939adc69e3495206a6b8121524d386b4285662c..141c763a9a08b94a8dc47d2702244eeb3200a61b 100644 (file)
@@ -4,8 +4,6 @@
 #include <unistd.h>
 #include <fcntl.h>
 
-#define DEFAULT_LOCK_TIMEOUT 120
-
 struct file_lock;
 struct dotlock;
 
index 9a409e0179e10859557266fcc076111f23249fe1..1a2af0ea105c89503f34525c4f7d0a176c8bcd3f 100644 (file)
@@ -3,8 +3,6 @@
 
 #include "iostream-rawlog.h"
 
-#define IOSTREAM_RAWLOG_MAX_PREFIX_LEN 3
-
 struct rawlog_iostream {
        struct iostream_private *iostream;
        enum iostream_rawlog_flags flags;
index 5bc19ada8ebe130701547ced8ede8dc982642932..76c0c2f46957e4472e01a0e50b1f6031d0b2f55d 100644 (file)
@@ -13,8 +13,6 @@
 
 #include <unistd.h>
 
-#define BUF_INITIAL_SIZE (1024*32)
-
 struct seekable_istream {
        struct istream_private istream;
 
index 56d47f91836d68dc3d7cf161b692dd22bd48ece4..b6d99a39cb3869a8703bea50df601f63a566aa1e 100644 (file)
@@ -13,7 +13,6 @@
    comparisons. Note that system CPU usage can grow very large on loaded
    systems, so we're not checking its upper limit at all. */
 #define ALLOW_MSECS_BELOW 500
-#define ALLOW_MSECS_ABOVE 3000
 
 static const char *const test_path = ".test.cpulimit";
 
index 7036e73fbe72ae4a5b189939b552ef39c1b8a118..85a2ae620ace9387959ec91c69a690478c870f64 100644 (file)
@@ -282,7 +282,6 @@ static void uni_ucs4_decompose_hangul_utf8(unichar_t chr, buffer_t *output)
 #define LBase 0x1100 
 #define VBase 0x1161 
 #define TBase 0x11A7
-#define LCount 19 
 #define VCount 21
 #define TCount 28
 #define NCount (VCount * TCount)
index 80d77725fb06535536214383469974fae0d3de45..9442f21b2d28a44178cd2bf17ac163fe419606d0 100644 (file)
@@ -4,8 +4,6 @@
 #include "net.h"
 #include "smtp-server.h"
 
-#define CLIENT_MAIL_DATA_MAX_INMEMORY_SIZE (1024*128)
-
 struct master_service_connection;
 struct mail_storage;
 struct mail_deliver_context;
index 82c9374a097506fd2168dbde2cb1b23d486cc2cd..926798bb3888b49962144276475edd351d06650c 100644 (file)
@@ -16,7 +16,6 @@
 #include <stdio.h>
 #include <unistd.h>
 
-#define FATAL_QUEUE_TIMEOUT_MSECS 500
 #define MAX_MSECS_PER_CONNECTION 100
 
 /* Log a warning after 1 secs when we've been all the time busy writing the
index 03147cbb4a28ac84a3bf347ba427d480b293fdb2..9e6b427ece314d3d48df8724cd73eb5c11c278dd 100644 (file)
@@ -27,7 +27,6 @@
 #define LOGIN_PROXY_DIE_IDLE_SECS 2
 #define LOGIN_PROXY_KILL_PREFIX "Disconnected by proxy: "
 #define KILLED_BY_ADMIN_REASON "Kicked by admin"
-#define KILLED_BY_DIRECTOR_REASON "Kicked via director"
 #define KILLED_BY_SHUTDOWN_REASON "Process shutting down"
 #define LOGIN_PROXY_SIDE_SELF "proxy"
 /* Wait this long before retrying on reconnect */
index 8f07d56c7d9235f06fbe8b6f42915e4afb149892..1138980633802eb1de67c7bed091d7279419365b 100644 (file)
@@ -10,8 +10,6 @@
    IMAP ACLs define only 10 standard rights and 10 user-defined rights. */
 #define DEFAULT_ACL_RIGHTS_COUNT 64
 
-#define ACL_GLOBAL_COUNT 2
-
 struct acl_object_cache {
        char *name;
 
index 18e04ad9b3b0c06300dcf789ab446b879a626030..4d3eb761c6629a91ee511f408da2ee985218c5b8 100644 (file)
@@ -13,8 +13,6 @@
 #include "acl-shared-storage.h"
 #include "acl-plugin.h"
 
-#define MAILBOX_FLAG_MATCHED 0x40000000
-
 struct acl_mailbox_list_iterate_context {
        union mailbox_list_iterate_module_context module_ctx;
 
index df5508bf132ef6ebc97ab273f066defbea72b9d9..315f5e0fdaba678fff80ceca352cc032d5c1bdf7 100644 (file)
@@ -10,8 +10,6 @@
 #include "imap-zlib-plugin.h"
 
 
-#define IMAP_COMPRESS_DEFAULT_LEVEL 6
-
 #define IMAP_ZLIB_IMAP_CONTEXT(obj) \
        MODULE_CONTEXT_REQUIRE(obj, imap_zlib_imap_module)
 
index 682cffe517b3c41553c75f8afdceaae2d8790c56..fd6af2ba44fe2bd093a28fc445f01e47359da9c0 100644 (file)
@@ -15,7 +15,6 @@ static void test_quota_transaction_is_over(void)
 {
 #define MAXU64 (uint64_t)-1
 #define MAXS64 9223372036854775807LL
-#define MINS64 (-MAXS64 - 1LL)
        static const struct test tests[] = {
                /* first test only with new_size=1. these are used for both
                   count and bytes tests: */
index 9b4bb089e3721aead038dba06c57e4a0f902a3cf..29e4dd8d6ecb8823659f6bdf4c2a744c7d91fad8 100644 (file)
@@ -18,7 +18,6 @@
 #define REPLICATION_SOCKET_NAME "replication-notify"
 #define REPLICATION_FIFO_NAME "replication-notify-fifo"
 #define REPLICATION_NOTIFY_DELAY_MSECS 500
-#define REPLICATION_SYNC_TIMEOUT_SECS 10
 
 #define REPLICATION_USER_CONTEXT(obj) \
        MODULE_CONTEXT(obj, replication_user_module)