Mercurial > dovecot > core-2.2
changeset 21761:0a4ca3f1f285
lib-http: test-http-server-errors: Fixed logically dead code.
Problem reported by Coverity.
author | Stephan Bosch <stephan.bosch@dovecot.fi> |
---|---|
date | Sun, 05 Mar 2017 19:45:04 +0100 |
parents | 439fd554cea0 |
children | 4a203e1b6389 |
files | src/lib-http/test-http-server-errors.c |
diffstat | 1 files changed, 3 insertions(+), 1 deletions(-) [+] |
line wrap: on
line diff
--- a/src/lib-http/test-http-server-errors.c Thu Mar 02 18:32:15 2017 +0200 +++ b/src/lib-http/test-http-server-errors.c Sun Mar 05 19:45:04 2017 +0100 @@ -250,7 +250,7 @@ if (ret == 0) return; - if (ret < 0) { + if (ctx->payload_input->stream_errno != 0) { if (debug) { i_debug("test server: failed to read payload: %s", i_stream_get_error(ctx->payload_input)); @@ -262,6 +262,8 @@ http_server_request_unref(&req); return; } + + i_assert(i_stream_is_eof(ctx->payload_input)); resp = http_server_response_create(req, 200, "OK"); http_server_response_submit(resp);