]> git.ipfire.org Git - thirdparty/dovecot/core.git/commitdiff
global: use %zu directly instead of PRIuSIZE_T
authorJosef 'Jeff' Sipek <jeff.sipek@open-xchange.com>
Tue, 17 Mar 2020 12:56:13 +0000 (08:56 -0400)
committerjeff.sipek <jeff.sipek@open-xchange.com>
Thu, 19 Mar 2020 14:49:35 +0000 (14:49 +0000)
60 files changed:
src/auth/auth-cache.c
src/auth/db-checkpassword.c
src/director/director-connection.c
src/doveadm/doveadm-dump-dbox.c
src/doveadm/doveadm-dump-log.c
src/doveadm/doveadm-dump-mailboxlog.c
src/imap/imap-client.c
src/imap/imap-master-client.c
src/imap/main.c
src/lib-compression/test-compression.c
src/lib-dcrypt/istream-decrypt.c
src/lib-dict/dict-memcached-ascii.c
src/lib-dict/dict-memcached.c
src/lib-fs/fs-posix.c
src/lib-fts/fts-filter-stemmer-snowball.c
src/lib-http/http-client-connection.c
src/lib-http/http-client-request.c
src/lib-http/http-server-connection.c
src/lib-http/test-http-payload.c
src/lib-imap-client/imapc-connection.c
src/lib-imap/imap-bodystructure.c
src/lib-imap/imap-quote.c
src/lib-imap/imap-util.c
src/lib-imap/test-imap-url.c
src/lib-index/mail-cache.c
src/lib-index/mail-index-map-hdr.c
src/lib-index/mail-index-map-read.c
src/lib-index/mail-transaction-log-file.c
src/lib-index/mail-transaction-log-view.c
src/lib-master/master-service-haproxy.c
src/lib-old-stats/stats-connection.c
src/lib-smtp/smtp-client-command.c
src/lib-smtp/smtp-client-connection.c
src/lib-smtp/smtp-server-connection.c
src/lib-smtp/test-smtp-payload.c
src/lib-ssl-iostream/dovecot-openssl-common.c
src/lib-storage/index/dbox-common/dbox-file.c
src/lib-storage/index/dbox-multi/mdbox-storage.c
src/lib-storage/index/imapc/imapc-storage.c
src/lib-storage/index/index-mailbox-size.c
src/lib-storage/index/mbox/mbox-sync-rewrite.c
src/lib/buffer.c
src/lib/data-stack.c
src/lib/iostream-temp.c
src/lib/istream-file.c
src/lib/istream.c
src/lib/malloc-overflow.h
src/lib/mempool-allocfree.c
src/lib/mempool-alloconly.c
src/lib/mempool-system.c
src/lib/mempool.h
src/lib/ostream.c
src/lib/test-base64.c
src/lib/test-istream-base64-decoder.c
src/lib/test-malloc-overflow.c
src/login-common/login-proxy.c
src/plugins/fts/fts-expunge-log.c
src/plugins/mail-filter/ostream-ext-filter.c
src/plugins/var-expand-crypt/var-expand-crypt-plugin.c
src/submission-login/client-authenticate.c

index 6d096c1847c5da40cb921a26d65bad51ed4e7cdd..931f6b42574b64cc52120fc5812f03ab57f0b3e6 100644 (file)
@@ -214,7 +214,7 @@ static void sig_auth_cache_stats(const siginfo_t *si ATTR_UNUSED, void *context)
 
        cache_used = cache->max_size - cache->size_left;
        i_info("Authentication cache current size: "
-              "%"PRIuSIZE_T" bytes used of %"PRIuSIZE_T" bytes (%u%%)",
+              "%zu bytes used of %zu bytes (%u%%)",
               cache_used, cache->max_size,
               (unsigned int)(cache_used * 100ULL / cache->max_size));
 
index a21aa043b9efd85be822f27c15a477511b0078c8..4e53641703cdaa678bb6b1ba88b33f18e69ba2c1 100644 (file)
@@ -468,7 +468,7 @@ void db_checkpassword_call(struct db_checkpassword *db,
                output_len += strlen(auth_password);
        if (output_len > CHECKPASSWORD_MAX_REQUEST_LEN) {
                e_info(authdb_event(request),
-                      "Username+password combination too long (%"PRIuSIZE_T" bytes)",
+                      "Username+password combination too long (%zu bytes)",
                       output_len);
                callback(request, DB_CHECKPASSWORD_STATUS_FAILURE,
                         NULL, request_callback);
index 028d3dbcb95ab4c9c71e683fe702504a29d0878d..f5a99bfe13c0dbf0fd2512455dba6bbb7fa468e8 100644 (file)
@@ -202,7 +202,7 @@ director_connection_append_stats(struct director_connection *conn, string_t *str
                            connected_msecs/1000, connected_msecs%1000);
        }
        if (o_stream_get_buffer_used_size(conn->output) > 0) {
-               str_printfa(str, ", %"PRIuSIZE_T" bytes in output buffer",
+               str_printfa(str, ", %zu bytes in output buffer",
                            o_stream_get_buffer_used_size(conn->output));
        }
        str_printfa(str, ", %zu peak output buffer size",
index fd67e1a6ac5a2f03de29a3937888ce6dd485bc51..c350471b9436650d0a7886ebe5ffde723584c954 100644 (file)
@@ -97,8 +97,8 @@ dump_msg_hdr(struct istream *input, unsigned int hdr_size, uoff_t *msg_size_r)
        if (i_stream_read_bytes(input, &data, &size, hdr_size) <= 0) {
                if (size == 0)
                        return FALSE;
-               i_fatal("Partial message header read at %"PRIuUOFF_T": "
-                       "%"PRIuSIZE_T" bytes", input->v_offset, size);
+               i_fatal("Partial message header read at %"PRIuUOFF_T": %zu bytes",
+                       input->v_offset, size);
        }
        printf("offset %"PRIuUOFF_T":\n", input->v_offset);
 
index bae217c47f3d62922e9808a64db7393924d7eb43..1a109178575b55364fa0ee9c923022e76bcb1ec9 100644 (file)
@@ -23,7 +23,7 @@ static void dump_hdr(struct istream *input, uint64_t *modseq_r,
        if (ret < 0 && input->stream_errno != 0)
                i_fatal("read() failed: %s", i_stream_get_error(input));
        if (ret <= 0) {
-               i_fatal("file hdr read() %"PRIuSIZE_T" != %"PRIuSIZE_T,
+               i_fatal("file hdr read() %zu != %zu",
                        size, sizeof(hdr));
        }
        memcpy(&hdr, data, sizeof(hdr));
@@ -480,7 +480,7 @@ static int dump_record(struct istream *input, uint64_t *modseq,
        if (ret <= 0) {
                if (size == 0)
                        return 0;
-               i_fatal("rec hdr read() %"PRIuSIZE_T" != %"PRIuSIZE_T,
+               i_fatal("rec hdr read() %zu != %zu",
                        size, sizeof(hdr));
        }
        memcpy(&hdr, data, sizeof(hdr));
@@ -502,7 +502,7 @@ static int dump_record(struct istream *input, uint64_t *modseq,
        if (ret < 0 && input->stream_errno != 0)
                i_fatal("read() failed: %s", i_stream_get_error(input));
        if (ret <= 0) {
-               i_fatal("rec data read() %"PRIuSIZE_T" != %"PRIuSIZE_T,
+               i_fatal("rec data read() %zu != %zu",
                        size, data_size);
        }
 
index 511a593b19d1df2fb3581ad96f812ff8d4a6a275..4f66da52e394213bd06e761e6e91a574589309b8 100644 (file)
@@ -24,7 +24,7 @@ static int dump_record(int fd)
                return 0;
 
        if (ret != sizeof(rec)) {
-               i_fatal("rec read() %"PRIuSIZE_T" != %"PRIuSIZE_T,
+               i_fatal("rec read() %zu != %zu",
                        ret, sizeof(rec));
        }
 
index 8ab402e4e5ba04b7a6532832d484e48d6d59d97a..9e43aac0c5236e147f1f64a04d263be0262c366e 100644 (file)
@@ -339,7 +339,7 @@ client_command_stats_append(string_t *str,
        str_printfa(str, ", %"PRIu64" B in + %"PRIu64,
                    stats->bytes_in, stats->bytes_out);
        if (buffered_size > 0)
-               str_printfa(str, "+%"PRIuSIZE_T, buffered_size);
+               str_printfa(str, "+%zu", buffered_size);
        str_append(str, " B out");
 }
 
index 9e4b872e972f7d2298aa3e4c7db8f194d13f265a..9b2e2df67983be960ce46c00501e0c34e7d5c768 100644 (file)
@@ -248,8 +248,7 @@ imap_master_client_input_args(struct connection *conn, const char *const *args,
            !i_stream_add_data(imap_client->input,
                               master_input.client_input->data,
                               master_input.client_input->used)) {
-               i_error("imap-master: Couldn't add %"PRIuSIZE_T
-                       " bytes to client's input stream",
+               i_error("imap-master: Couldn't add %zu bytes to client's input stream",
                        master_input.client_input->used);
                client_destroy(imap_client, "Client initialization failed");
                return -1;
index 58157a40dafe462210c418f6c0fba77c5b76dbe4..4cf4062463e02a62785b34463e952676953a781f 100644 (file)
@@ -89,7 +89,7 @@ void imap_refresh_proctitle(void)
                                wait_output = TRUE;
                }
                if (wait_output) {
-                       str_printfa(title, " - %"PRIuSIZE_T" bytes waiting",
+                       str_printfa(title, " - %zu bytes waiting",
                                    o_stream_get_buffer_used_size(client->output));
                        if (o_stream_is_corked(client->output))
                                str_append(title, " corked");
index 9096ae522ff052b3884c1fc25c11d4f9c8201c39..d1d48ad0901d5e24f47fbf91f7bebc3393c6a32a 100644 (file)
@@ -512,7 +512,7 @@ test_compression_handler_random_io(const struct compression_handler *handler)
                }
 
                if (test_has_failed()) {
-                       i_info("Test parameters: size=%"PRIuSIZE_T,
+                       i_info("Test parameters: size=%zu",
                                in_buf_size);
                }
 
index 96fcc978321b8db4fd786dc995990499eb58c74d..ffa35133408035d357644c5c57d23270cd5f5cf6 100644 (file)
@@ -867,7 +867,7 @@ i_stream_decrypt_read(struct istream_private *stream)
                                        stream->istream.stream_errno = EINVAL;
                                        io_stream_set_error(&stream->iostream,
                                                "Header too large "
-                                               "(more than %"PRIuSIZE_T" bytes)",
+                                               "(more than %zu bytes)",
                                                size);
                                        return -1;
                                }
index 7f6cb9d1dd141ef026b4c89739d65751c0e9b4f7..970f74dc4b10932f161d75a7b32a2ef6c2976f76 100644 (file)
@@ -566,7 +566,7 @@ memcached_send_change(struct dict_memcached_ascii_commit_ctx *ctx,
        switch (change->type) {
        case DICT_CHANGE_TYPE_SET:
                state = MEMCACHED_INPUT_STATE_STORED;
-               str_printfa(ctx->str, "set %s 0 0 %"PRIuSIZE_T"\r\n%s\r\n",
+               str_printfa(ctx->str, "set %s 0 0 %zu\r\n%s\r\n",
                            key, strlen(change->value.str), change->value.str);
                break;
        case DICT_CHANGE_TYPE_UNSET:
index 87773fdc8fa6cc0d7fc9afe87fb6e6f6a089f134..2b82dc6be0f7f41525b5c6226efbf721b26d7fd5 100644 (file)
@@ -291,7 +291,7 @@ memcached_dict_lookup(struct dict *_dict, pool_t pool, const char *key,
        key_len = strlen(key);
        if (key_len > 0xffff) {
                *error_r = t_strdup_printf(
-                       "memcached: Key is too long (%"PRIuSIZE_T" bytes): %s", key_len, key);
+                       "memcached: Key is too long (%zu bytes): %s", key_len, key);
                return -1;
        }
 
index 4199e2bdda0f07ea8802e126f924e382fabe6cb0..1b42da012ffb8fdff888122b257e0581ee673761 100644 (file)
@@ -624,7 +624,7 @@ static int fs_posix_write(struct fs_file *_file, const void *data, size_t size)
        }
        if ((size_t)ret != size) {
                fs_set_error(_file->event, ENOSPC,
-                            "write(%s) returned %"PRIuSIZE_T"/%"PRIuSIZE_T,
+                            "write(%s) returned %zu/%zu",
                             file->full_path, (size_t)ret, size);
                return -1;
        }
index 5bf1f15ed035aa85a07d6d6c3e1b2a3543825427..96d91fdf1462d293be8a9c00626215ea5fd12705 100644 (file)
@@ -84,8 +84,8 @@ fts_filter_stemmer_snowball_filter(struct fts_filter *filter,
                /* the only reason why this could fail is because of
                   out of memory. */
                i_fatal_status(FATAL_OUTOFMEM,
-                              "sb_stemmer_stem(len=%"PRIuSIZE_T") failed: "
-                              "Out of memory", strlen(*token));
+                              "sb_stemmer_stem(len=%zu) failed: Out of memory",
+                              strlen(*token));
        }
        *token = t_strndup(base, sb_stemmer_length(sp->stemmer));
        return 1;
index 79a7a021bd1d20eb7776a6ed6ac2e3d2794106b7..ee10f34917c857018f43fd0da43de0092050b276 100644 (file)
@@ -1532,13 +1532,13 @@ http_client_connection_connected(struct connection *_conn, bool success)
                if (set->socket_send_buffer_size > 0) {
                        if (net_set_send_buffer_size(_conn->fd_out,
                                set->socket_send_buffer_size) < 0)
-                               i_error("net_set_send_buffer_size(%"PRIuSIZE_T") failed: %m",
+                               i_error("net_set_send_buffer_size(%zu) failed: %m",
                                        set->socket_send_buffer_size);
                }
                if (set->socket_recv_buffer_size > 0) {
                        if (net_set_recv_buffer_size(_conn->fd_in,
                                set->socket_recv_buffer_size) < 0)
-                               i_error("net_set_recv_buffer_size(%"PRIuSIZE_T") failed: %m",
+                               i_error("net_set_recv_buffer_size(%zu) failed: %m",
                                        set->socket_recv_buffer_size);
                }
 
index eb719715b47ca0b772cae5b8f7db51267de1a6c0..0ea0a08ab5b9220c2690ea0c9dcb6c0d4e749126 100644 (file)
@@ -1195,7 +1195,7 @@ int http_client_request_send_more(struct http_client_request *req,
        o_stream_set_max_buffer_size(output, (size_t)-1);
 
        i_assert(req->payload_input->v_offset >= offset);
-       e_debug(req->event, "Send more (sent %"PRIuUOFF_T", buffered=%"PRIuSIZE_T")",
+       e_debug(req->event, "Send more (sent %"PRIuUOFF_T", buffered=%zu)",
                (uoff_t)(req->payload_input->v_offset - offset),
                o_stream_get_buffer_used_size(output));
 
index 15cc060088dc2c08ccba4801681da8d53e102959..7f175dea770475b3229ce06c5e3ae2b5f0ac676f 100644 (file)
@@ -1096,13 +1096,13 @@ http_server_connection_create(struct http_server *server,
        if (set->socket_send_buffer_size > 0) {
                if (net_set_send_buffer_size(fd_out,
                        set->socket_send_buffer_size) < 0)
-                       i_error("net_set_send_buffer_size(%"PRIuSIZE_T") failed: %m",
+                       i_error("net_set_send_buffer_size(%zu) failed: %m",
                                set->socket_send_buffer_size);
        }
        if (set->socket_recv_buffer_size > 0) {
                if (net_set_recv_buffer_size(fd_in,
                        set->socket_recv_buffer_size) < 0)
-                       i_error("net_set_recv_buffer_size(%"PRIuSIZE_T") failed: %m",
+                       i_error("net_set_recv_buffer_size(%zu) failed: %m",
                                set->socket_recv_buffer_size);
        }
 
index 6b9a4affb411a1a18e6ffc9e24caa0dcae27f137..894ca15b790415cfff7d9b7e027c489c6aa47a15 100644 (file)
@@ -801,7 +801,7 @@ test_client_download_payload_input(struct test_client_request *tcreq)
                                fsize = 0;
                        i_fatal("test client: download: "
                                "payload ended prematurely "
-                               "(at least %"PRIuSIZE_T" bytes left)", fsize);
+                               "(at least %zu bytes left)", fsize);
                } else if (debug) {
                        i_debug("test client: download: "
                                "finished request for [%u]",
@@ -1039,7 +1039,7 @@ test_client_echo_payload_input(struct test_client_request *tcreq)
                                fsize = 0;
                        i_fatal("test client: echo: "
                                "payload ended prematurely "
-                               "(at least %"PRIuSIZE_T" bytes left)", fsize);
+                               "(at least %zu bytes left)", fsize);
                } else if (debug) {
                        i_debug("test client: echo: "
                                "finished request for [%u]",
index 5f26fe54c6baac5946c0b6d755b55d2a2dda2490..dab0fe5440e0fb499f4c6e9de619576e1899d67c 100644 (file)
@@ -1591,7 +1591,7 @@ static void imapc_connection_input(struct imapc_connection *conn)
                                    conn->disconnect_reason);
                } else if (ret == -2) {
                        str_printfa(str, "Server sent too large input "
-                                   "(buffer full at %"PRIuSIZE_T")",
+                                   "(buffer full at %zu)",
                                    i_stream_get_data_size(conn->input));
                } else if (conn->ssl_iostream == NULL) {
                        errstr = conn->input->stream_errno == 0 ? "EOF" :
@@ -2421,10 +2421,10 @@ void imapc_command_sendvf(struct imapc_command *cmd,
                                imap_append_quoted(cmd->data, arg);
                        else if ((cmd->conn->capabilities &
                                  IMAPC_CAPABILITY_LITERALPLUS) != 0) {
-                               str_printfa(cmd->data, "{%"PRIuSIZE_T"+}\r\n%s",
+                               str_printfa(cmd->data, "{%zu+}\r\n%s",
                                            strlen(arg), arg);
                        } else {
-                               str_printfa(cmd->data, "{%"PRIuSIZE_T"}\r\n%s",
+                               str_printfa(cmd->data, "{%zu}\r\n%s",
                                            strlen(arg), arg);
                        }
                        break;
index a2d778f8074bfe6632715519943e25774113c9a4..f98b061b5a1dc0fb57905facdc4735da7c8d8339 100644 (file)
@@ -697,7 +697,7 @@ static bool str_append_nstring(string_t *str, const struct imap_arg *arg)
                str_append_c(str, '"');
                break;
        case IMAP_ARG_LITERAL: {
-               str_printfa(str, "{%"PRIuSIZE_T"}\r\n", strlen(cstr));
+               str_printfa(str, "{%zu}\r\n", strlen(cstr));
                str_append(str, cstr);
                break;
        }
index c86114e8f2e68938b4d0d8ac36651e7c0b8df997..622e21cb7917ecc546578cd421da72b338f2e317 100644 (file)
@@ -46,7 +46,7 @@ imap_append_literal(string_t *dest, const char *src, unsigned int pos)
 {
        size_t full_len = pos + strlen(src+pos);
 
-       str_printfa(dest, "{%"PRIuSIZE_T"}\r\n", full_len);
+       str_printfa(dest, "{%zu}\r\n", full_len);
        buffer_append(dest, src, full_len);
 }
 
@@ -207,7 +207,7 @@ void imap_append_string_for_humans(string_t *dest,
                return;
        }
 
-       str_printfa(dest, "{%"PRIuSIZE_T"}\r\n", size - remove_count);
+       str_printfa(dest, "{%zu}\r\n", size - remove_count);
        pos = str_len(dest);
 
        last_lwsp = TRUE; whitespace_prefix = TRUE;
index b6d4258131eec5a8d928b379202941698e0590f5..dc1ae244669d872c1c03b9d1bcfb82fbeb0a8c40 100644 (file)
@@ -92,7 +92,7 @@ void imap_write_arg(string_t *dest, const struct imap_arg *arg)
        }
        case IMAP_ARG_LITERAL: {
                const char *strarg = imap_arg_as_astring(arg);
-               str_printfa(dest, "{%"PRIuSIZE_T"}\r\n",
+               str_printfa(dest, "{%zu}\r\n",
                            strlen(strarg));
                str_append(dest, strarg);
                break;
@@ -158,7 +158,7 @@ void imap_write_args_for_human(string_t *dest, const struct imap_arg *args)
                        const char *strarg = imap_arg_as_astring(args);
 
                        if (strpbrk(strarg, "\r\n") != NULL) {
-                               str_printfa(dest, "<%"PRIuSIZE_T" byte multi-line literal>",
+                               str_printfa(dest, "<%zu byte multi-line literal>",
                                            strlen(strarg));
                                break;
                        }
index 5fbe5599852fc19b7d498551e847b27d4dfc197b..877d84e4504c77365a0172e0f011a4fcb2462497 100644 (file)
@@ -743,7 +743,7 @@ static void test_imap_url_valid(void)
                                        bool equal = urlp->uauth_token_size == urlt->uauth_token_size;
                                        size_t i;
                                        test_out_quiet(t_strdup_printf(
-                                                              "url->uauth_token_size = %"PRIuSIZE_T, urlp->uauth_token_size),
+                                                              "url->uauth_token_size = %zu", urlp->uauth_token_size),
                                                       equal);
 
                                        if (equal) {
index 82f74a8a22b02da537b6acbdd7c735dbbcc45183..14b57b533feeb03200a36bee35dd7bb16950b879 100644 (file)
@@ -509,7 +509,7 @@ int mail_cache_map(struct mail_cache *cache, size_t offset, size_t size,
                if (ioloop_time != cache->last_mmap_error_time) {
                        cache->last_mmap_error_time = ioloop_time;
                        mail_cache_set_syscall_error(cache, t_strdup_printf(
-                               "mmap(size=%"PRIuSIZE_T")", cache->mmap_length));
+                               "mmap(size=%zu)", cache->mmap_length));
                }
                cache->mmap_length = 0;
                return -1;
index 256d6d2e6a0e9855997e187e95eb894bfef31379..3daa870b98e396ed6e38f99659d89297570bf9f7 100644 (file)
@@ -243,7 +243,7 @@ int mail_index_map_check_header(struct mail_index_map *map,
        /* following some extra checks that only take a bit of CPU */
        if (hdr->record_size < sizeof(struct mail_index_record)) {
                *error_r = t_strdup_printf(
-                       "record_size too small (%u < %"PRIuSIZE_T")",
+                       "record_size too small (%u < %zu)",
                        hdr->record_size, sizeof(struct mail_index_record));
                return -1;
        }
index c73480a0eaaebb2ed879373ada5093a6add73532..bf219320f452a139d35c81443c309688dc8e18fe 100644 (file)
@@ -67,7 +67,7 @@ static int mail_index_mmap(struct mail_index_map *map, uoff_t file_size)
 
        if (rec_map->mmap_size < MAIL_INDEX_HEADER_MIN_SIZE) {
                mail_index_set_error(index, "Corrupted index file %s: "
-                                    "File too small (%"PRIuSIZE_T")",
+                                    "File too small (%zu)",
                                     index->filepath, rec_map->mmap_size);
                return 0;
        }
index 5bd5e338f6117588b5f877fc1a7c91717271f71a..220659af82274e1d99809cbde7fcaa574629f1b1 100644 (file)
@@ -1741,9 +1741,9 @@ mail_transaction_log_file_mmap(struct mail_transaction_log_file *file,
                if (ioloop_time != file->last_mmap_error_time) {
                        file->last_mmap_error_time = ioloop_time;
                        log_file_set_syscall_error(file, t_strdup_printf(
-                               "mmap(size=%"PRIuSIZE_T")", file->mmap_size));
+                               "mmap(size=%zu)", file->mmap_size));
                }
-               *reason_r = t_strdup_printf("mmap(size=%"PRIuSIZE_T") failed: %m",
+               *reason_r = t_strdup_printf("mmap(size=%zu) failed: %m",
                                            file->mmap_size);
                file->mmap_size = 0;
                return -1;
index f42d57fd632f459edc2c9154dfdf74f993035ea2..ddf42440db2a40d2bb50f07c0aee245b046d801f 100644 (file)
@@ -778,7 +778,7 @@ log_view_get_next(struct mail_transaction_log_view *view,
        if (view->cur_offset + sizeof(*hdr) > file_size) {
                mail_transaction_log_file_set_corrupted(file,
                        "offset points outside file "
-                       "(%"PRIuUOFF_T" + %"PRIuSIZE_T" > %"PRIuSIZE_T")",
+                       "(%"PRIuUOFF_T" + %zu > %zu)",
                        view->cur_offset, sizeof(*hdr), file_size);
                return -1;
        }
@@ -800,7 +800,7 @@ log_view_get_next(struct mail_transaction_log_view *view,
        if (file_size - view->cur_offset < full_size) {
                mail_transaction_log_file_set_corrupted(file,
                        "record size too large (type=0x%x, "
-                       "offset=%"PRIuUOFF_T", size=%u, end=%"PRIuSIZE_T")",
+                       "offset=%"PRIuUOFF_T", size=%u, end=%zu)",
                        rec_type, view->cur_offset, full_size, file_size);
                return -1;
        }
index f1a3bfdc3db54b624968e814b4705d0a6c020647..2affb8b70428fb4528ff48990c502951412ae649 100644 (file)
@@ -213,7 +213,7 @@ master_service_haproxy_parse_ssl_tlv(struct master_service_haproxy_conn *hpconn,
        for(size_t i = 0; i < ssl_kv->len;) {
                struct haproxy_pp2_tlv kv;
                if (get_tlv(ssl_kv->data + i, ssl_kv->len - i, &kv) < 0) {
-                       *error_r = t_strdup_printf("get_tlv(%"PRIuSIZE_T") failed:"
+                       *error_r = t_strdup_printf("get_tlv(%zu) failed: "
                                                   "Truncated data", i);
                        return -1;
                }
@@ -243,7 +243,7 @@ master_service_haproxy_parse_tlv(struct master_service_haproxy_conn *hpconn,
                 struct haproxy_pp2_tlv_ssl ssl_kv;
 
                if (get_tlv(buf + i, blen - i, &kv) < 0) {
-                       *error_r = t_strdup_printf("get_tlv(%"PRIuSIZE_T") failed:"
+                       *error_r = t_strdup_printf("get_tlv(%zu) failed: "
                                                   "Truncated data", i);
                        return -1;
                }
@@ -262,7 +262,7 @@ master_service_haproxy_parse_tlv(struct master_service_haproxy_conn *hpconn,
                         break;
                 case PP2_TYPE_SSL:
                        if (get_ssl_tlv(kv.data, kv.len, &ssl_kv) < 0) {
-                               *error_r = t_strdup_printf("get_ssl_tlv(%"PRIuSIZE_T") failed:"
+                               *error_r = t_strdup_printf("get_ssl_tlv(%zu) failed: "
                                                           "Truncated data", i);
                                return -1;
                        }
@@ -375,7 +375,7 @@ master_service_haproxy_read(struct master_service_haproxy_conn *hpconn)
                if (ret < (ssize_t)size) {
                        i_error("haproxy(v2): Client disconnected: "
                                "Protocol payload length does not match header "
-                               "(got=%"PRIuSIZE_T", expect=%"PRIuSIZE_T", rip=%s)",
+                               "(got=%zu, expect=%zu, rip=%s)",
                                (size_t)ret, size, net_ip2addr(real_remote_ip));
                        return -1;
                }
index 5b79a44eaccaccd93f475163472f66c17a35a212..24b5e73f40575a326173775698641fdec592f017 100644 (file)
@@ -85,7 +85,7 @@ int stats_connection_send(struct stats_connection *conn, const string_t *str)
 
        if (str_len(str) > PIPE_BUF && !pipe_warned) {
                i_warning("stats update sent more bytes that PIPE_BUF "
-                         "(%"PRIuSIZE_T" > %u), this may break statistics",
+                         "(%zu > %u), this may break statistics",
                          str_len(str), (unsigned int)PIPE_BUF);
                pipe_warned = TRUE;
        }
index cc2ed3ba55164685a6c14ca66b12685963716f85..80fb5bf3520597869a975e6851ab07e2fe32f8dc 100644 (file)
@@ -1424,7 +1424,7 @@ _cmd_bdat_send_chunks(struct _cmd_data_context *ctx,
        cmd = ctx->cmd_data;
        smtp_client_command_set_stream(cmd, chunk, FALSE);
        i_stream_unref(&chunk);
-       smtp_client_command_printf(cmd, "BDAT %"PRIuSIZE_T" LAST", data_size);
+       smtp_client_command_printf(cmd, "BDAT %zu LAST", data_size);
        smtp_client_command_submit_after(cmd, cmd_prev);
 
        if (array_count(&ctx->cmds) == 0) {
index c3ccf6e425d85b25d9e7afc3642622e2498e638b..a8782b3bb26c3e64c3ca85a6cb6c15dfd2650863 100644 (file)
@@ -1399,14 +1399,14 @@ smtp_client_connection_connected(struct connection *_conn, bool success)
            net_set_send_buffer_size(_conn->fd_out,
                                     set->socket_send_buffer_size) < 0) {
                e_error(conn->event,
-                       "net_set_send_buffer_size(%"PRIuSIZE_T") failed: %m",
+                       "net_set_send_buffer_size(%zu) failed: %m",
                        set->socket_send_buffer_size);
        }
        if (set->socket_recv_buffer_size > 0 &&
            net_set_recv_buffer_size(_conn->fd_in,
                                     set->socket_recv_buffer_size) < 0) {
                e_error(conn->event,
-                       "net_set_recv_buffer_size(%"PRIuSIZE_T") failed: %m",
+                       "net_set_recv_buffer_size(%zu) failed: %m",
                        set->socket_recv_buffer_size);
        }
 
index 8219184948fadfa8fecae130b883bdb3760358c3..404acc888b0dff5186783ff7187059974a8eca1b 100644 (file)
@@ -923,14 +923,14 @@ smtp_server_connection_alloc(struct smtp_server *server,
            net_set_send_buffer_size(fd_out,
                                     set->socket_send_buffer_size) < 0) {
                e_error(conn->event,
-                       "net_set_send_buffer_size(%"PRIuSIZE_T") failed: %m",
+                       "net_set_send_buffer_size(%zu) failed: %m",
                        set->socket_send_buffer_size);
        }
        if (set->socket_recv_buffer_size > 0 &&
            net_set_recv_buffer_size(fd_in,
                                     set->socket_recv_buffer_size) < 0) {
                e_error(conn->event,
-                       "net_set_recv_buffer_size(%"PRIuSIZE_T") failed: %m",
+                       "net_set_recv_buffer_size(%zu) failed: %m",
                        set->socket_recv_buffer_size);
        }
 
index 72a8464a61af0134e400fe06c9e2efe50aa23061..38feb5bd27d51bc7cc9f03d22fbb618d7caa8ebd 100644 (file)
@@ -240,7 +240,7 @@ client_transaction_read_more(struct client_transaction *ctrans)
                        fsize = 0;
                i_fatal("test server: "
                        "payload ended prematurely "
-                       "(at least %"PRIuSIZE_T" bytes left)", fsize);
+                       "(at least %zu bytes left)", fsize);
        }
 
        if (debug) {
index d68d15ffb6b467e79279b353496b1d27c822d78a..76f98bc9e70bc71a1e0308da9dfb656ada93186b 100644 (file)
@@ -22,7 +22,7 @@ static void *dovecot_openssl_malloc(size_t size)
        void *mem = malloc(size);
        if (mem == NULL) {
                i_fatal_status(FATAL_OUTOFMEM,
-                       "OpenSSL: malloc(%"PRIuSIZE_T"): Out of memory", size);
+                       "OpenSSL: malloc(%zu): Out of memory", size);
        }
        return mem;
 }
@@ -36,7 +36,7 @@ static void *dovecot_openssl_realloc(void *ptr, size_t size)
        void *mem = realloc(ptr, size);
        if (mem == NULL) {
                i_fatal_status(FATAL_OUTOFMEM,
-                       "OpenSSL: realloc(%"PRIuSIZE_T"): Out of memory", size);
+                       "OpenSSL: realloc(%zu): Out of memory", size);
        }
        return mem;
 }
index d861fb04ec77687454b09812cbf586fcaba12f40..410b070bc38879f238ec9a824fc82a45215702c2 100644 (file)
@@ -360,7 +360,7 @@ int dbox_file_read_mail_header(struct dbox_file *file, uoff_t *physical_size_r)
                if (file->input->stream_errno == 0) {
                        /* EOF, broken offset or file truncated */
                        dbox_file_set_corrupted(file, "EOF reading msg header "
-                                               "(got %"PRIuSIZE_T"/%u bytes)",
+                                               "(got %zu/%u bytes)",
                                                size, file->msg_header_size);
                        return 0;
                }
index e0cc706d9bbf5e1d3e7fed4e92c17cdaf889ef73..fbd4604449ae10826d6a18b44602185ecb6eeac7 100644 (file)
@@ -217,7 +217,7 @@ int mdbox_read_header(struct mdbox_mailbox *mbox,
        if (data_size < MDBOX_INDEX_HEADER_MIN_SIZE &&
            (!mbox->creating || data_size != 0)) {
                mailbox_set_critical(&mbox->box,
-                       "mdbox: Invalid dbox header size: %"PRIuSIZE_T,
+                       "mdbox: Invalid dbox header size: %zu",
                        data_size);
                mdbox_storage_set_corrupted(mbox->storage);
                return -1;
index d90ea66b3387d699b9ac0bfe9a7399847873fd62..2e758b129e5f19af097e400d6cfccf2e45a3b139 100644 (file)
@@ -404,7 +404,7 @@ imapc_storage_create(struct mail_storage *_storage,
        /* serialize all the settings */
        _storage->unique_root_dir = p_strdup_printf(_storage->pool,
                                                    "%s%s://(%s|%s):%s@%s:%u/%s mechs:%s features:%s "
-                                                   "rawlog:%s cmd_timeout:%u maxidle:%u maxline:%"PRIuSIZE_T"u "
+                                                   "rawlog:%s cmd_timeout:%u maxidle:%u maxline:%zuu "
                                                    "pop3delflg:%s root_dir:%s",
                                                    storage->set->imapc_ssl,
                                                    storage->set->imapc_ssl_verify ? "(verify)" : "",
index 6a8259baa3017c72721f4f9e51ab49ff8245330f..9c7651c6efa9b2e9dc42987b1c693aff01a83bd6 100644 (file)
@@ -73,7 +73,7 @@ static void vsize_header_refresh(struct mailbox_vsize_update *update)
        else {
                if (size != 0) {
                        mailbox_set_critical(update->box,
-                               "vsize-hdr has invalid size: %"PRIuSIZE_T,
+                               "vsize-hdr has invalid size: %zu",
                                size);
                }
                update->rebuild = TRUE;
index cc3496006494e4330e18b13a7353313f15d45d74..d6c16e2825189b87a5f6243296addb18fc85b74c 100644 (file)
@@ -434,7 +434,7 @@ static int mbox_sync_read_and_move(struct mbox_sync_context *sync_ctx,
                        mbox_sync_set_critical(sync_ctx,
                                "seq=%u uid=%u uid_broken=%d "
                                "originally needed %"PRIuUOFF_T
-                               " bytes, now needs %"PRIuSIZE_T" bytes",
+                               " bytes, now needs %zu bytes",
                                seq, mails[idx].uid, mails[idx].uid_broken ? 1 : 0,
                                (uoff_t)-mails[idx].space, need_space);
                        return -1;
index f1883edb165a6223f160e320740aec9882894d2f..316771802b366c06d8e11748201915b65b043d68 100644 (file)
@@ -46,10 +46,9 @@ buffer_check_limits(struct real_buffer *buf, size_t pos, size_t data_size)
        unsigned int extra;
        size_t new_size;
 
-       if (unlikely((size_t)-1 - pos < data_size)) {
-               i_panic("Buffer write out of range (%"PRIuSIZE_T
-                       " + %"PRIuSIZE_T")", pos, data_size);
-       }
+       if (unlikely((size_t)-1 - pos < data_size))
+               i_panic("Buffer write out of range (%zu + %zu)", pos, data_size);
+
        new_size = pos + data_size;
 
        if (new_size > buf->used && buf->used < buf->dirty) {
@@ -66,8 +65,8 @@ buffer_check_limits(struct real_buffer *buf, size_t pos, size_t data_size)
        extra = buf->dynamic ? 1 : 0;
        if (new_size + extra > buf->alloc) {
                if (unlikely(!buf->dynamic)) {
-                       i_panic("Buffer full (%"PRIuSIZE_T" > %"PRIuSIZE_T", "
-                               "pool %s)", pos + data_size, buf->alloc,
+                       i_panic("Buffer full (%zu > %zu, pool %s)",
+                               pos + data_size, buf->alloc,
                                buf->pool == NULL ? "<none>" :
                                pool_get_name(buf->pool));
                }
index e102769c5e359b8f5980f64828a262da92666e25..82887991a424268f36448eae92e17ee4d522c639 100644 (file)
@@ -355,8 +355,8 @@ static struct stack_block *mem_block_alloc(size_t min_size)
                        return &outofmem_area.block;
                }
                outofmem = TRUE;
-               i_panic("data stack: Out of memory when allocating %"
-                       PRIuSIZE_T" bytes", alloc_size + SIZEOF_MEMBLOCK);
+               i_panic("data stack: Out of memory when allocating %zu bytes",
+                       alloc_size + SIZEOF_MEMBLOCK);
        }
        block->size = alloc_size;
        block->left = 0;
@@ -380,7 +380,7 @@ static void *t_malloc_real(size_t size, bool permanent)
 #endif
 
        if (unlikely(size == 0 || size > SSIZE_T_MAX))
-               i_panic("Trying to allocate %"PRIuSIZE_T" bytes", size);
+               i_panic("Trying to allocate %zu bytes", size);
 
        if (unlikely(!data_stack_initialized)) {
                /* kludgy, but allow this before initialization */
@@ -474,7 +474,7 @@ bool t_try_realloc(void *mem, size_t size)
        unsigned char *after_last_alloc;
 
        if (unlikely(size == 0 || size > SSIZE_T_MAX))
-               i_panic("Trying to allocate %"PRIuSIZE_T" bytes", size);
+               i_panic("Trying to allocate %zu bytes", size);
        block_canary_check(current_block);
 
        last_alloc_size = current_frame_block->last_alloc_size[frame_pos];
index 3e6db4fd9867f5b5af6ffcdb7fcb4870e17a7edf..11b9e6833cea978fd3d348b4949f44a881235e34 100644 (file)
@@ -388,7 +388,7 @@ struct istream *iostream_temp_finish(struct ostream **output,
                input = i_stream_create_from_data(tstream->buf->data,
                                                  tstream->buf->used);
                i_stream_set_name(input, t_strdup_printf(
-                       "(Temp buffer in %s%s, %"PRIuSIZE_T" bytes)",
+                       "(Temp buffer in %s%s, %zu bytes)",
                        tstream->temp_path_prefix, for_path, tstream->buf->used));
                i_stream_add_destroy_callback(input, iostream_temp_buf_destroyed,
                                              tstream->buf);
index 9989eaac0283354012306bc1dcd1e2cc87bb0f92..e89e9d46d7a2c3f6f1d1458ebb420b567e8298a9 100644 (file)
@@ -89,12 +89,11 @@ ssize_t i_stream_file_read(struct istream_private *stream)
                        i_assert(errno != EBADF);
                        if (fstream->file) {
                                io_stream_set_error(&stream->iostream,
-                                       "pread(size=%"PRIuSIZE_T
-                                       " offset=%"PRIuUOFF_T") failed: %m",
+                                       "pread(size=%zu offset=%"PRIuUOFF_T") failed: %m",
                                        size, offset);
                        } else {
                                io_stream_set_error(&stream->iostream,
-                                       "read(size=%"PRIuSIZE_T") failed: %m",
+                                       "read(size=%zu) failed: %m",
                                        size);
                        }
                        stream->istream.stream_errno = errno;
index 2c71f1dbf03b9b7b764ce35da63dc45e9402e4b9..771079d30c5b64d14d3d8191dd2d7eae1998cf5c 100644 (file)
@@ -629,7 +629,7 @@ char *i_stream_read_next_line(struct istream *stream)
                switch (i_stream_read(stream)) {
                case -2:
                        io_stream_set_error(&stream->real_stream->iostream,
-                               "Line is too long (over %"PRIuSIZE_T
+                               "Line is too long (over %zu"
                                " bytes at offset %"PRIuUOFF_T")",
                                i_stream_get_data_size(stream), stream->v_offset);
                        stream->stream_errno = errno = ENOBUFS;
index 590e6585cc8284c6c439fe2197a3ea9cd48528ab..108cc00ac04c1e98e3096dfb47757c75cd678263 100644 (file)
@@ -15,8 +15,8 @@ malloc_multiply_check(size_t a, size_t b, size_t sizeof_a, size_t sizeof_b,
           if-check for types that are small enough to never wrap size_t. */
        if ((sizeof_a * 2 > sizeof(size_t) || sizeof_b * 2 > sizeof(size_t)) &&
            b != 0 && (a > SIZE_MAX / b)) {
-               i_panic("file %s: line %d: memory allocation overflow: "
-                       "%" PRIuSIZE_T" * %" PRIuSIZE_T, fname, linenum, a, b);
+               i_panic("file %s: line %d: memory allocation overflow: %zu * %zu",
+                       fname, linenum, a, b);
        }
        return a * b;
 }
@@ -37,8 +37,8 @@ malloc_add_check(size_t a, size_t b, size_t sizeof_a, size_t sizeof_b,
           if-check for types that are small enough to never wrap size_t. */
        if ((sizeof_a >= sizeof(size_t) || sizeof_b >= sizeof(size_t)) &&
            SIZE_MAX - a < b) {
-               i_panic("file %s: line %d: memory allocation overflow: "
-                       "%" PRIuSIZE_T" + %" PRIuSIZE_T, fname, linenum, a, b);
+               i_panic("file %s: line %d: memory allocation overflow: %zu + %zu",
+                       fname, linenum, a, b);
        }
        return a + b;
 }
index 4b3d3b71f599e977664fca343f8f867150b359f7..239f984be14dbdfab14cce858eb85b9b5b8e0300 100644 (file)
@@ -152,7 +152,7 @@ pool_t pool_allocfree_create(const char *name ATTR_UNUSED)
 
        pool = calloc(1, SIZEOF_ALLOCFREE_POOL);
        if (pool == NULL)
-               i_fatal_status(FATAL_OUTOFMEM, "calloc(1, %"PRIuSIZE_T"): Out of memory",
+               i_fatal_status(FATAL_OUTOFMEM, "calloc(1, %zu): Out of memory",
                               SIZEOF_ALLOCFREE_POOL);
 #ifdef DEBUG
        pool->name = strdup(name);
@@ -257,7 +257,7 @@ static void *pool_allocfree_malloc(pool_t pool, size_t size)
 
        struct pool_block *block = calloc(1, SIZEOF_POOLBLOCK + size);
        if (block == NULL)
-               i_fatal_status(FATAL_OUTOFMEM, "calloc(1, %"PRIuSIZE_T"): Out of memory",
+               i_fatal_status(FATAL_OUTOFMEM, "calloc(1, %zu): Out of memory",
                               SIZEOF_POOLBLOCK + size);
        block->size = size;
        return pool_block_attach(apool, block);
@@ -282,7 +282,7 @@ static void *pool_allocfree_realloc(pool_t pool, void *mem,
 
        struct pool_block *block = pool_block_detach(apool, mem);
        if ((new_mem = realloc(block, SIZEOF_POOLBLOCK+new_size)) == NULL)
-               i_fatal_status(FATAL_OUTOFMEM, "realloc(block, %"PRIuSIZE_T")",
+               i_fatal_status(FATAL_OUTOFMEM, "realloc(block, %zu)",
                               SIZEOF_POOLBLOCK+new_size);
 
        /* zero out new memory */
index c6673b3b4fc9dd3841f57d549ab96378207dfa49..f037dd1235cc82bf7b89fae03f82e73f6e8f6762 100644 (file)
@@ -359,7 +359,7 @@ static void block_alloc(struct alloconly_pool *apool, size_t size)
                           stack, so make sure everything is allocated before
                           calling it. */
                        t_buffer_alloc_last_full();
-                       i_debug("Growing pool '%s' with: %"PRIuSIZE_T,
+                       i_debug("Growing pool '%s' with: %zu",
                                  apool->name, size);
                }
 #endif
@@ -367,7 +367,7 @@ static void block_alloc(struct alloconly_pool *apool, size_t size)
 
        block = calloc(size, 1);
        if (unlikely(block == NULL)) {
-               i_fatal_status(FATAL_OUTOFMEM, "block_alloc(%"PRIuSIZE_T
+               i_fatal_status(FATAL_OUTOFMEM, "block_alloc(%zu"
                               "): Out of memory", size);
        }
        block->prev = apool->block;
index 06e0bcbe8c1dfe2968fc6b76c4668abb21933bd3..51ea7e34f85344c2aee087669e51f84bef916014 100644 (file)
@@ -104,8 +104,8 @@ static void *pool_system_malloc(pool_t pool ATTR_UNUSED, size_t size)
 
        mem = calloc(size, 1);
        if (unlikely(mem == NULL)) {
-               i_fatal_status(FATAL_OUTOFMEM, "pool_system_malloc(%"PRIuSIZE_T
-                              "): Out of memory", size);
+               i_fatal_status(FATAL_OUTOFMEM, "pool_system_malloc(%zu): "
+                              "Out of memory", size);
        }
 #ifdef DEBUG
        /* we rely on errno not changing. it shouldn't. */
@@ -139,8 +139,8 @@ static void *pool_system_realloc(pool_t pool ATTR_UNUSED, void *mem,
 
        mem = realloc(mem, new_size);
        if (unlikely(mem == NULL)) {
-               i_fatal_status(FATAL_OUTOFMEM, "pool_system_realloc(%"PRIuSIZE_T
-                              "): Out of memory", new_size);
+               i_fatal_status(FATAL_OUTOFMEM, "pool_system_realloc(%zu): "
+                              "Out of memory", new_size);
        }
 
        if (old_size < new_size) {
index 12ce2210aed1186e9ee4c35dd482605f9a406895..9c7aca058180878da7bfd0647fa80059257307d6 100644 (file)
@@ -102,7 +102,7 @@ static inline void * ATTR_MALLOC ATTR_RETURNS_NONNULL
 p_malloc(pool_t pool, size_t size)
 {
        if (unlikely(size == 0 || size > POOL_MAX_ALLOC_SIZE))
-               i_panic("Trying to allocate %" PRIuSIZE_T " bytes", size);
+               i_panic("Trying to allocate %zu bytes", size);
 
        return pool->v->malloc(pool, size);
 }
@@ -111,7 +111,7 @@ static inline void * ATTR_WARN_UNUSED_RESULT ATTR_RETURNS_NONNULL
 p_realloc(pool_t pool, void *mem, size_t old_size, size_t new_size)
 {
        if (unlikely(new_size == 0 || new_size > POOL_MAX_ALLOC_SIZE))
-               i_panic("Trying to reallocate %" PRIuSIZE_T " -> %" PRIuSIZE_T " bytes",
+               i_panic("Trying to reallocate %zu -> %zu bytes",
                        old_size, new_size);
 
        if (mem == NULL)
index 594bebc89e2e0790b162b1449ee7d4be88f16aa4..b77ee278cc825169e590d30769455e3310a83e05 100644 (file)
@@ -191,7 +191,7 @@ int o_stream_flush(struct ostream *stream)
 
        if (unlikely(_stream->noverflow)) {
                io_stream_set_error(&_stream->iostream,
-                       "Output stream buffer was full (%"PRIuSIZE_T" bytes)",
+                       "Output stream buffer was full (%zu bytes)",
                        o_stream_get_max_buffer_size(stream));
                errno = stream->stream_errno = ENOBUFS;
                return -1;
index 8175c66dcc38f3db97e18c80ada7a5457b77cabb..8ac63294155cf4cc5bb0507d6759d98881c8ce75 100644 (file)
@@ -1101,7 +1101,7 @@ test_base64_random_lowlevel_case(const struct base64_scheme *b64,
                if (test_has_failed()) {
                        i_info("One block test failed ("
                               "enc_flags=%02x dec_flags=%02x "
-                              "max_line_len=%"PRIuSIZE_T" size=%"PRIuSIZE_T")",
+                              "max_line_len=%zu size=%zu)",
                                enc_flags, dec_flags, max_line_len,
                                in_buf_size);
                        return;
@@ -1122,7 +1122,7 @@ test_base64_random_lowlevel_case(const struct base64_scheme *b64,
                if (test_has_failed()) {
                        i_info("Streaming single-byte trickle test failed ("
                               "enc_flags=%02x dec_flags=%02x "
-                              "max_line_len=%"PRIuSIZE_T" size=%"PRIuSIZE_T")",
+                              "max_line_len=%zu size=%zu)",
                                enc_flags, dec_flags, max_line_len,
                                in_buf_size);
                        return;
@@ -1142,7 +1142,7 @@ test_base64_random_lowlevel_case(const struct base64_scheme *b64,
                if (test_has_failed()) {
                        i_info("Streaming random chunks test failed ("
                               "enc_flags=%02x dec_flags=%02x "
-                              "max_line_len=%"PRIuSIZE_T" size=%"PRIuSIZE_T")",
+                              "max_line_len=%zu size=%zu)",
                                enc_flags, dec_flags, max_line_len,
                                in_buf_size);
                        return;
index 36280293d3a167016989ce615ca60f4181303eb3..188e3e581ebd3d97775a92a2079cd12a9455feda 100644 (file)
@@ -291,7 +291,7 @@ test_istream_base64_io_random(void)
                }
 
                if (test_has_failed()) {
-                       i_info("Test parameters: size=%"PRIuSIZE_T" "
+                       i_info("Test parameters: size=%zu "
                               "line_length_1=%u line_length_2=%u",
                                in_buf_size, chpl1, chpl2);
                }
index 6b7ae7fca9ea1bd01b6c14411fa74a9777d10499..ceb48bb24760f72b4000a04c6c6b25ad0f22b978 100644 (file)
@@ -59,10 +59,10 @@ static enum fatal_test_state fatal_malloc_overflow_multiply(unsigned int *stage)
        switch (*stage) {
        case 0:
                test_begin("MALLOC_MULTIPLY() overflows");
-               i_error("%"PRIuSIZE_T, MALLOC_MULTIPLY((size_t)SIZE_MAX/2, (uint8_t)3));
+               i_error("%zu", MALLOC_MULTIPLY((size_t)SIZE_MAX/2, (uint8_t)3));
                break;
        case 1:
-               i_error("%"PRIuSIZE_T, MALLOC_MULTIPLY((uint8_t)3, (size_t)SIZE_MAX/2));
+               i_error("%zu", MALLOC_MULTIPLY((uint8_t)3, (size_t)SIZE_MAX/2));
                break;
        }
        *stage -= 2;
@@ -77,9 +77,9 @@ static enum fatal_test_state fatal_malloc_overflow_multiply(unsigned int *stage)
        i = *stage / 2;
 
        if (*stage % 2 == 0)
-               i_error("%"PRIuSIZE_T, MALLOC_MULTIPLY(mul_tests[i].a, mul_tests[i].b));
+               i_error("%zu", MALLOC_MULTIPLY(mul_tests[i].a, mul_tests[i].b));
        else
-               i_error("%"PRIuSIZE_T, MALLOC_MULTIPLY(mul_tests[i].b, mul_tests[i].a));
+               i_error("%zu", MALLOC_MULTIPLY(mul_tests[i].b, mul_tests[i].a));
        return FATAL_TEST_FAILURE;
 }
 
@@ -97,10 +97,10 @@ static enum fatal_test_state fatal_malloc_overflow_add(unsigned int *stage)
        switch (*stage) {
        case 0:
                test_begin("MALLOC_ADD() overflows");
-               i_error("%"PRIuSIZE_T, MALLOC_ADD((size_t)SIZE_MAX, (uint8_t)1));
+               i_error("%zu", MALLOC_ADD((size_t)SIZE_MAX, (uint8_t)1));
                break;
        case 1:
-               i_error("%"PRIuSIZE_T, MALLOC_ADD((uint8_t)1, (size_t)SIZE_MAX));
+               i_error("%zu", MALLOC_ADD((uint8_t)1, (size_t)SIZE_MAX));
                break;
        }
        *stage -= 2;
@@ -115,9 +115,9 @@ static enum fatal_test_state fatal_malloc_overflow_add(unsigned int *stage)
        i = *stage / 2;
 
        if (*stage % 2 == 0)
-               i_error("%"PRIuSIZE_T, MALLOC_ADD(add_tests[i].a, add_tests[i].b));
+               i_error("%zu", MALLOC_ADD(add_tests[i].a, add_tests[i].b));
        else
-               i_error("%"PRIuSIZE_T, MALLOC_ADD(add_tests[i].b, add_tests[i].a));
+               i_error("%zu", MALLOC_ADD(add_tests[i].b, add_tests[i].a));
        return FATAL_TEST_FAILURE;
 }
 
index 1888060731d3e8a1df221178675e9ec54804e251..1d46a65c3c56c1503217e0470d1420b97d540f0e 100644 (file)
@@ -114,7 +114,7 @@ static void login_proxy_free_errstr(struct login_proxy **_proxy,
                    (int)(ioloop_time - proxy_last_io(proxy)),
                    proxy->server_output->offset, proxy->client_output->offset);
        if (o_stream_get_buffer_used_size(proxy->client_output) > 0) {
-               str_printfa(reason, "+%"PRIuSIZE_T,
+               str_printfa(reason, "+%zu",
                            o_stream_get_buffer_used_size(proxy->client_output));
        }
        if (iostream_proxy_is_waiting_output(proxy->iostream_proxy,
index 4409585141a5404f9da3c4024a772c6cc048a377..bcb9d40f36c6d14aaca86699478f27dfccababc4 100644 (file)
@@ -429,7 +429,7 @@ fts_expunge_log_read_failure(struct fts_expunge_log_read_ctx *ctx,
                size = i_stream_get_data_size(ctx->input);
                ctx->corrupted = TRUE;
                i_error("Corrupted fts expunge log %s: "
-                       "Unexpected EOF (read %"PRIuSIZE_T" / %u bytes)",
+                       "Unexpected EOF (read %zu / %u bytes)",
                        ctx->log->path, size, wanted_size);
        }
 }
index b8c3bfc29918ed8c2ba6d09c2e6a0679cd1daea3..6e8481e5e845c101cded41bedb3be1826d7d9d9d 100644 (file)
@@ -163,7 +163,7 @@ static int filter_connect(struct mail_filter_ostream *mstream,
                        mstream->ext_out->stream_errno;
        } else if ((size_t)ret != str_len(str)) {
                io_stream_set_error(&mstream->ostream.iostream,
-                       "write(%s): Wrote only %"PRIuSIZE_T" of %"PRIuSIZE_T" bytes",
+                       "write(%s): Wrote only %zu of %zu bytes",
                        socket_path, (size_t)ret, str_len(str));
                mstream->ostream.ostream.stream_errno = ENOBUFS;
        }
index 53ec8853849747bf49e6cce67fe6b6dec81a0d63..75ba350a17036486c7d37d54f15b5003fa2a2da7 100644 (file)
@@ -111,7 +111,7 @@ var_expand_crypt(struct dcrypt_context_symmetric *dctx, buffer_t *key, buffer_t
                /* acquire IV */
                dcrypt_ctx_sym_get_iv(dctx, iv);
        } else if (dcrypt_ctx_sym_get_iv_length(dctx) != iv->used) {
-               *error_r = t_strdup_printf("crypt: IV length invalid (%"PRIuSIZE_T" != %u)",
+               *error_r = t_strdup_printf("crypt: IV length invalid (%zu != %u)",
                                           iv->used,
                                           dcrypt_ctx_sym_get_iv_length(dctx));
                return -1;
@@ -120,7 +120,7 @@ var_expand_crypt(struct dcrypt_context_symmetric *dctx, buffer_t *key, buffer_t
        }
 
        if (dcrypt_ctx_sym_get_key_length(dctx) != key->used) {
-               *error_r = t_strdup_printf("crypt: Key length invalid (%"PRIuSIZE_T" != %u)",
+               *error_r = t_strdup_printf("crypt: Key length invalid (%zu != %u)",
                                           key->used,
                                           dcrypt_ctx_sym_get_key_length(dctx));
                return -1;
index 3b2680a520453bd01baed298bf874cd14b519302..f61384f297a0019c2cce628dc31c9cebf6927a84 100644 (file)
@@ -61,7 +61,7 @@ static void cmd_helo_reply(struct submission_client *subm_client,
 
                if (subm_client->set->submission_max_mail_size > 0) {
                        smtp_server_reply_ehlo_add_param(reply,
-                               "SIZE", "%"PRIuSIZE_T,
+                               "SIZE", "%zu",
                                subm_client->set->submission_max_mail_size);
                } else {
                        smtp_server_reply_ehlo_add(reply, "SIZE");