Skip to content

Commit 36c2cef

Browse files
committed
axe some useless or debug-inhibiting error checking
git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/trunk@1075064 13f79535-47bb-0310-9956-ffa450edef68
1 parent bb6fec4 commit 36c2cef

2 files changed

Lines changed: 0 additions & 37 deletions

File tree

modules/proxy/ajp_link.c

Lines changed: 0 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -24,12 +24,6 @@ apr_status_t ajp_ilink_send(apr_socket_t *sock, ajp_msg_t *msg)
2424
apr_status_t status;
2525
apr_size_t length;
2626

27-
if (sock == NULL) {
28-
ap_log_error(APLOG_MARK, APLOG_ERR, 0, NULL,
29-
"ajp_ilink_send(): NULL socket provided");
30-
return AJP_EINVAL;
31-
}
32-
3327
ajp_msg_end(msg);
3428

3529
length = msg->len;
@@ -83,12 +77,6 @@ apr_status_t ajp_ilink_receive(apr_socket_t *sock, ajp_msg_t *msg)
8377
apr_size_t hlen;
8478
apr_size_t blen;
8579

86-
if (sock == NULL) {
87-
ap_log_error(APLOG_MARK, APLOG_ERR, 0, NULL,
88-
"ajp_ilink_receive(): NULL socket provided");
89-
return AJP_EINVAL;
90-
}
91-
9280
hlen = msg->header_len;
9381

9482
status = ilink_read(sock, msg->buf, hlen);

modules/proxy/ajp_msg.c

Lines changed: 0 additions & 25 deletions
Original file line numberDiff line numberDiff line change
@@ -506,28 +506,9 @@ apr_status_t ajp_msg_create(apr_pool_t *pool, apr_size_t size, ajp_msg_t **rmsg)
506506
{
507507
ajp_msg_t *msg = (ajp_msg_t *)apr_pcalloc(pool, sizeof(ajp_msg_t));
508508

509-
if (!msg) {
510-
ap_log_error(APLOG_MARK, APLOG_ERR, 0, NULL,
511-
"ajp_msg_create(): can't allocate AJP message memory");
512-
return APR_ENOPOOL;
513-
}
514-
515509
msg->server_side = 0;
516510

517511
msg->buf = (apr_byte_t *)apr_palloc(pool, size);
518-
519-
/* XXX: This should never happen
520-
* In case if the OS cannont allocate 8K of data
521-
* we are in serious trouble
522-
* No need to check the alloc return value, cause the
523-
* core dump is probably the best solution anyhow.
524-
*/
525-
if (msg->buf == NULL) {
526-
ap_log_error(APLOG_MARK, APLOG_ERR, 0, NULL,
527-
"ajp_msg_create(): can't allocate AJP message memory");
528-
return APR_ENOPOOL;
529-
}
530-
531512
msg->len = 0;
532513
msg->header_len = AJP_HEADER_LEN;
533514
msg->max_size = size;
@@ -545,12 +526,6 @@ apr_status_t ajp_msg_create(apr_pool_t *pool, apr_size_t size, ajp_msg_t **rmsg)
545526
*/
546527
apr_status_t ajp_msg_copy(ajp_msg_t *smsg, ajp_msg_t *dmsg)
547528
{
548-
if (dmsg == NULL) {
549-
ap_log_error(APLOG_MARK, APLOG_ERR, 0, NULL,
550-
"ajp_msg_copy(): destination msg is null");
551-
return AJP_EINVAL;
552-
}
553-
554529
if (smsg->len > smsg->max_size) {
555530
ap_log_error(APLOG_MARK, APLOG_ERR, 0, NULL,
556531
"ajp_msg_copy(): destination buffer too "

0 commit comments

Comments
 (0)