Skip to content

Commit

Permalink
global: Code cleanup - remove unnecessary errno changes.
Browse files Browse the repository at this point in the history
These were left behind from changing %m to [io]_stream_get_error()
  • Loading branch information
sirainen authored and GitLab committed May 18, 2016
1 parent 8acb8de commit 43cc944
Show file tree
Hide file tree
Showing 6 changed files with 0 additions and 8 deletions.
2 changes: 0 additions & 2 deletions src/doveadm/dsync/dsync-mailbox-import.c
Expand Up @@ -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;
Expand Down
1 change: 0 additions & 1 deletion src/imap/cmd-append.c
Expand Up @@ -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),
Expand Down
1 change: 0 additions & 1 deletion src/imap/cmd-urlfetch.c
Expand Up @@ -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));
Expand Down
2 changes: 0 additions & 2 deletions src/lib-http/http-client-request.c
Expand Up @@ -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));
Expand Down
1 change: 0 additions & 1 deletion src/lib-imap-storage/imap-msgpart.c
Expand Up @@ -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));
Expand Down
1 change: 0 additions & 1 deletion src/lib-storage/index/index-mail-binary.c
Expand Up @@ -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));
Expand Down

0 comments on commit 43cc944

Please sign in to comment.