]> git.ipfire.org Git - thirdparty/dovecot/core.git/commitdiff
global: Code cleanup - remove unnecessary errno changes.
authorTimo Sirainen <timo.sirainen@dovecot.fi>
Mon, 16 May 2016 12:34:49 +0000 (15:34 +0300)
committerGitLab <gitlab@git.dovecot.net>
Wed, 18 May 2016 12:21:30 +0000 (15:21 +0300)
These were left behind from changing %m to [io]_stream_get_error()

src/doveadm/dsync/dsync-mailbox-import.c
src/imap/cmd-append.c
src/imap/cmd-urlfetch.c
src/lib-http/http-client-request.c
src/lib-imap-storage/imap-msgpart.c
src/lib-storage/index/index-mail-binary.c

index c82da81f23df4dfb37d43df1382aeb0e7dcb6e1f..148c8dd5b7f3461f451f55a6b7d612e37975a56a 100644 (file)
@@ -372,13 +372,11 @@ dsync_istreams_cmp(struct istream *input1, struct istream *input2, int *cmp_r)
                i_stream_skip(input2, size);
        }
        if (input1->stream_errno != 0) {
-               errno = input1->stream_errno;
                i_error("read(%s) failed: %s", i_stream_get_name(input1),
                        i_stream_get_error(input1));
                return -1;
        }
        if (input2->stream_errno != 0) {
-               errno = input2->stream_errno;
                i_error("read(%s) failed: %s", i_stream_get_name(input2),
                        i_stream_get_error(input2));
                return -1;
index ad72018351b088ac48bb7e6b3f598ee1b6ea5198..3d9a3d1f04ae633fe0e2c97c7ac87b7671ca85d0 100644 (file)
@@ -213,7 +213,6 @@ cmd_append_catenate_mpurl(struct client_command_context *cmd,
        }
 
        if (mpresult.input->stream_errno != 0) {
-               errno = mpresult.input->stream_errno;
                mail_storage_set_critical(ctx->box->storage,
                        "read(%s) failed: %s (for CATENATE URL %s)",
                        i_stream_get_name(mpresult.input),
index c08ead0a508a8fe59cf64cc9e71fed034f563324..b9b01fc5c838c0b36aa15692bbe797032e2e288d 100644 (file)
@@ -111,7 +111,6 @@ static int cmd_urlfetch_transfer_literal(struct client_command_context *cmd)
                return -1;
        }
        if (ctx->input->stream_errno != 0) {
-               errno = ctx->input->stream_errno;
                i_error("read(%s) failed: %s (URLFETCH)",
                        i_stream_get_name(ctx->input),
                        i_stream_get_error(ctx->input));
index 6bfdc54b583c929aa215ed1a998c665201b722bb..536351c971cd4bfd2b8e2cbc13302ebefc6fb535 100644 (file)
@@ -820,14 +820,12 @@ int http_client_request_send_more(struct http_client_request *req,
 
                /* we're in the middle of sending a request, so the connection
                   will also have to be aborted */
-               errno = req->payload_input->stream_errno;
                *error_r = t_strdup_printf("read(%s) failed: %s",
                                           i_stream_get_name(req->payload_input),
                                           i_stream_get_error(req->payload_input));
                return -1;
        } else if (output->stream_errno != 0) {
                /* failed to send request */
-               errno = output->stream_errno;
                *error_r = t_strdup_printf("write(%s) failed: %s",
                                           o_stream_get_name(output),
                                           o_stream_get_error(output));
index 37e85b9ee9afc911e7aaa01d8a9b3b05b36c5726..c40627dc792166ec8b74e139dc0998d657f17eee 100644 (file)
@@ -394,7 +394,6 @@ imap_msgpart_get_partial_header(struct mail *mail, struct istream *mail_input,
        }
 
        if (message_get_header_size(input, &hdr_size, &has_nuls) < 0) {
-               errno = input->stream_errno;
                mail_storage_set_critical(mail->box->storage,
                        "read(%s) failed: %s", i_stream_get_name(mail_input),
                        i_stream_get_error(mail_input));
index e3781857334127c26dd97464834fa15eaddfb086..7f604dbe2e85bfed57b3ccfad7c1917302bc26ec 100644 (file)
@@ -114,7 +114,6 @@ add_binary_part(struct binary_ctx *ctx, const struct message_part *part,
        message_parse_header_deinit(&parser);
 
        if (ctx->input->stream_errno != 0) {
-               errno = ctx->input->stream_errno;
                mail_storage_set_critical(ctx->mail->box->storage,
                        "read(%s) failed: %s", i_stream_get_name(ctx->input),
                        i_stream_get_error(ctx->input));