Skip to content

Commit c794b4d

Browse files
committed
Do not check if the input sock param is NULL. It's already checked before
the function is called. git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/trunk@105183 13f79535-47bb-0310-9956-ffa450edef68
1 parent 39a24ae commit c794b4d

1 file changed

Lines changed: 2 additions & 11 deletions

File tree

modules/proxy/ajp_link.c

Lines changed: 2 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -53,19 +53,10 @@ apr_status_t ajp_ilink_send(apr_socket_t *sock, ajp_msg_t *msg)
5353
static apr_status_t ilink_read(apr_socket_t *sock, char * buf,
5454
apr_size_t len)
5555
{
56-
apr_size_t length;
56+
apr_size_t length = len;
57+
apr_size_t rdlen = 0;
5758
apr_status_t status;
58-
apr_size_t rdlen;
5959

60-
if (sock == NULL) {
61-
ap_log_error(APLOG_MARK, APLOG_ERR, 0, NULL,
62-
"ajp_ilink_readN(): NULL socket provided");
63-
return AJP_EINVAL;
64-
}
65-
66-
rdlen = 0;
67-
length = len;
68-
6960
while (rdlen < len) {
7061

7162
status = apr_socket_recv(sock, buf + rdlen, &length);

0 commit comments

Comments
 (0)