Skip to content

Commit

Permalink
doveadm: Remove dead code
Browse files Browse the repository at this point in the history
ret can never be >0 at this point. If there are any unexpected JSON
elements, doveadm_http_server_json_parse_v1() returns -1.
  • Loading branch information
sirainen authored and Timo Sirainen committed Nov 6, 2017
1 parent 88734aa commit 6c30d94
Showing 1 changed file with 0 additions and 9 deletions.
9 changes: 0 additions & 9 deletions src/doveadm/client-connection-http.c
Expand Up @@ -730,15 +730,6 @@ doveadm_http_server_read_request_v1(struct client_request_http *req)

doveadm_cmd_params_clean(&req->pargv);

if (ret > 0 && req->parse_state != CLIENT_REQUEST_PARSE_DONE) {
/* this may happen if the parser above runs into
unexpected element, but JSON is OK */
http_server_request_fail_text(http_sreq,
400, "Bad Request",
"Unexpected JSON element in input");
return;
}

if (req->input->stream_errno != 0) {
http_server_request_fail_close(http_sreq,
400, "Client disconnected");
Expand Down

0 comments on commit 6c30d94

Please sign in to comment.