Skip to content

Commit

Permalink
test: lib-http: Check write_full return value in test
Browse files Browse the repository at this point in the history
Makes static analyzers happier
  • Loading branch information
cmouse authored and sirainen committed Mar 30, 2017
1 parent b64df82 commit 1389da1
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion src/lib-http/test-http-client.c
Expand Up @@ -27,7 +27,8 @@ static void payload_input(struct http_test_request *req)
while ((ret=i_stream_read_data(req->payload, &data, &size, 0)) > 0) {
i_info("DEBUG: got data (size=%d)", (int)size);
if (req->write_output)
write_full(1, data, size);
if (write_full(1, data, size) < 0)
i_error("REQUEST PAYLOAD WRITE ERROR: %m");
i_stream_skip(req->payload, size);
}

Expand Down

0 comments on commit 1389da1

Please sign in to comment.