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 13/16] remove unneeded prototypes
Date Wed, 20 Sep 2006 02:34:06 GMT
Remove unneeded prototypes for static functions.

Index: modules/cache/mod_disk_cache.c
===================================================================
--- modules/cache/mod_disk_cache.c.orig
+++ modules/cache/mod_disk_cache.c
@@ -53,14 +53,6 @@
 
 module AP_MODULE_DECLARE_DATA disk_cache_module;
 
-/* Forward declarations */
-static int remove_entity(cache_handle_t *h);
-static apr_status_t store_headers(cache_handle_t *h, request_rec *r, cache_info *i);
-static apr_status_t store_body(cache_handle_t *h, request_rec *r, apr_bucket_brigade *b);
-static apr_status_t recall_headers(cache_handle_t *h, request_rec *r);
-static apr_status_t recall_body(cache_handle_t *h, apr_pool_t *p, apr_bucket_brigade *bb);
-static apr_status_t read_array(apr_array_header_t* arr, apr_file_t *file);
-
 /*
  * Local static functions
  */
@@ -153,6 +145,58 @@
     return rv;
 }
 
+/* XXX this is a temporary function, it will be removed later */
+static apr_status_t read_array(apr_array_header_t* array, apr_file_t *file)
+{
+    apr_status_t rv;
+    apr_size_t nbytes;
+    apr_finfo_t finfo;
+    char *buffer, *end;
+
+    rv = apr_file_info_get(&finfo, APR_FINFO_SIZE, file);
+
+    if (rv != APR_SUCCESS) {
+        return rv;
+    }
+
+    nbytes = finfo.size;
+
+    buffer = apr_palloc(array->pool, nbytes);
+
+    rv = apr_file_read(file, buffer, &nbytes);
+
+    if (rv != APR_SUCCESS) {
+        return rv;
+    }
+
+    end = memchr(buffer, CR, nbytes);
+
+    if (end == NULL) {
+        return APR_EGENERAL;
+    }
+
+    *end = '\0';
+
+    array_unserialize(array, buffer);
+
+    return APR_SUCCESS;
+}
+
+/* XXX this is a temporary function, it will be removed later */
+static apr_status_t store_array(apr_pool_t *p, apr_file_t *fd,
+                                apr_array_header_t* array)
+{
+    char *str;
+    apr_size_t len;
+
+    str = array_serialize(p, array, &len);
+
+    if (apr_file_printf(fd, "%s" CRLF, str) < 0)
+        return APR_EGENERAL;
+    else
+        return APR_SUCCESS;
+}
+
 /* htcacheclean may remove directories underneath us.
  * So, we'll try renaming three times at a cost of 0.002 seconds.
  */
@@ -582,58 +626,6 @@
 }
 
 /* XXX this is a temporary function, it will be removed later */
-static apr_status_t read_array(apr_array_header_t* array, apr_file_t *file)
-{
-    apr_status_t rv;
-    apr_size_t nbytes;
-    apr_finfo_t finfo;
-    char *buffer, *end;
-
-    rv = apr_file_info_get(&finfo, APR_FINFO_SIZE, file);
-
-    if (rv != APR_SUCCESS) {
-        return rv;
-    }
-
-    nbytes = finfo.size;
-
-    buffer = apr_palloc(array->pool, nbytes);
-
-    rv = apr_file_read(file, buffer, &nbytes);
-
-    if (rv != APR_SUCCESS) {
-        return rv;
-    }
-
-    end = memchr(buffer, CR, nbytes);
-
-    if (end == NULL) {
-        return APR_EGENERAL;
-    }
-
-    *end = '\0';
-
-    array_unserialize(array, buffer);
-
-    return APR_SUCCESS;
-}
-
-/* XXX this is a temporary function, it will be removed later */
-static apr_status_t store_array(apr_pool_t *p, apr_file_t *fd,
-                                apr_array_header_t* array)
-{
-    char *str;
-    apr_size_t len;
-
-    str = array_serialize(p, array, &len);
-
-    if (apr_file_printf(fd, "%s" CRLF, str) < 0)
-        return APR_EGENERAL;
-    else
-        return APR_SUCCESS;
-}
-
-/* XXX this is a temporary function, it will be removed later */
 static apr_status_t read_table(apr_pool_t *p, apr_table_t *table, apr_file_t *fd)
 {
     char *end, *buf;

--

Mime
View raw message