From c237a7b72ed1ca17a7ed07f5e56c7422d887449f Mon Sep 17 00:00:00 2001 From: Jeff Trawick Date: Tue, 28 Nov 2000 18:57:31 +0000 Subject: [PATCH] Fix some lvalue casts so that we can compile with xlc on AIX. Submitted by: "Victor J. Orlikowski" Reviewed by: Jeff Trawick git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/trunk@87104 13f79535-47bb-0310-9956-ffa450edef68 --- modules/filters/mod_include.c | 9 +++++---- modules/http/http_core.c | 10 ++++++++-- 2 files changed, 13 insertions(+), 6 deletions(-) diff --git a/modules/filters/mod_include.c b/modules/filters/mod_include.c index 77f3ccbc7b..9fa55c1ac2 100644 --- a/modules/filters/mod_include.c +++ b/modules/filters/mod_include.c @@ -655,8 +655,7 @@ static void parse_string(request_rec *r, const char *in, char *out, /* pjr hack char var[MAX_STRING_LEN]; */ const char *start_of_var_name; char *end_of_var_name; /* end of var name + 1 */ - const char *expansion; - const char *val; + const char *expansion, *temp_end, *val; char tmp_store; size_t l; @@ -673,7 +672,8 @@ static void parse_string(request_rec *r, const char *in, char *out, *next = '\0'; return; } - (const char *)end_of_var_name = in; + temp_end = in; + end_of_var_name = (char *)temp_end; ++in; } else { @@ -681,7 +681,8 @@ static void parse_string(request_rec *r, const char *in, char *out, while (apr_isalnum(*in) || *in == '_') { ++in; } - (const char *)end_of_var_name = in; + temp_end = in; + end_of_var_name = (char *)temp_end; } /* what a pain, too bad there's no table_getn where you can * pass a non-nul terminated string */ diff --git a/modules/http/http_core.c b/modules/http/http_core.c index 4347dad9d6..344b0b62e1 100644 --- a/modules/http/http_core.c +++ b/modules/http/http_core.c @@ -2617,8 +2617,11 @@ static apr_status_t sendfile_it_all(conn_rec *c, ++hdtr->headers; } else { + char *iov_base = (char *)hdtr->headers[0].iov_base; + hdtr->headers[0].iov_len -= tmplen; - (char *) hdtr->headers[0].iov_base += tmplen; + iov_base += tmplen; + hdtr->headers[0].iov_base = iov_base; tmplen = 0; } } @@ -2643,8 +2646,11 @@ static apr_status_t sendfile_it_all(conn_rec *c, ++hdtr->trailers; } else { + char *iov_base = (char *)hdtr->trailers[0].iov_base; + hdtr->trailers[0].iov_len -= tmplen; - (char *)hdtr->trailers[0].iov_base += tmplen; + iov_base += tmplen; + hdtr->trailers[0].iov_base = iov_base; tmplen = 0; } } -- 2.50.1