httpd-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Davi Arnaut <d...@haxent.com.br>
Subject [patch 14/16] remove unneeded casts
Date Wed, 20 Sep 2006 02:34:07 GMT
Remove unneeded casts.

Index: modules/cache/mod_disk_cache.c
===================================================================
--- modules/cache/mod_disk_cache.c.orig
+++ modules/cache/mod_disk_cache.c
@@ -116,7 +116,7 @@
     }
 }
 
-static apr_status_t disk_mktemp(apr_file_t **fp, const char *dest, char **tempfile,
+static apr_status_t disk_mktemp(apr_file_t **fp, char *dest, char **tempfile,
                                 apr_int32_t flags, disk_cache_conf *conf,
                                 apr_pool_t *p)
 {
@@ -124,7 +124,7 @@
     apr_status_t rv;
     struct iovec iov[2];
 
-    iov[0].iov_base = (char *) dest;
+    iov[0].iov_base = dest;
     iov[0].iov_len  = ap_strrchr_c(dest, '/') - dest;
 
     iov[1].iov_base = AP_TEMPFILE;
@@ -382,12 +382,11 @@
     char *token;
 
     while ((token = ap_get_list_item(p, &data)) != NULL) {
-        *((const char **) apr_array_push(arr)) = token;
+        APR_ARRAY_PUSH(arr, char *) = token;
     }
 
     /* Sort it so that "Vary: A, B" and "Vary: B, A" are stored the same. */
-    qsort((void *) arr->elts, arr->nelts,
-         sizeof(char *), array_alphasort);
+    qsort(arr->elts, arr->nelts, sizeof(char *), array_alphasort);
 }
 
 /*

--

Mime
View raw message