You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@httpd.apache.org by "Victor J. Orlikowski" <v....@gte.net> on 2000/11/27 23:05:34 UTC
[PATCH] No lvalue casts!
Casting an lvalue doesn't jibe with ANSI C. This cleans *that* up.
Index: src/main/http_core.c
===================================================================
RCS file: /cvs/apache/apache-2.0/src/main/http_core.c,v
retrieving revision 1.225
diff -u -d -r1.225 http_core.c
--- http_core.c 2000/11/26 04:47:30 1.225
+++ http_core.c 2000/11/27 21:58:17
@@ -2617,8 +2617,10 @@
++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 +2645,10 @@
++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;
}
}
Index: src/modules/standard/mod_include.c
===================================================================
RCS file: /cvs/apache/apache-2.0/src/modules/standard/mod_include.c,v
retrieving revision 1.77
diff -u -d -r1.77 mod_include.c
--- mod_include.c 2000/11/26 04:47:36 1.77
+++ mod_include.c 2000/11/27 21:58:17
@@ -655,8 +655,7 @@
/* 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 @@
*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 @@
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 */
Victor
--
Victor J. Orlikowski
======================
v.j.orlikowski@gte.net
vjo@raleigh.ibm.com
vjo@us.ibm.com