httpd-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Victor J. Orlikowski" <...@raleigh.ibm.com>
Subject [PATCH] re-submit of compiler cleanup, for debate....
Date Fri, 23 Jun 2000 14:52:21 GMT
There was some matter of debate on this patch. Cleans up a compiler warning,
since ap_bread and ap_bwrite want to be passed an ap_size_t, but nbytes and
i are ints. The matter of debate: why ap_bread and ap_bwrite have ap_size_t
for one argument, and ap_ssize_t for the other, in thestyle of read() and
write().

Index: src/ap/ap_cache.c
===================================================================
RCS file: /cvs/apache/apache-2.0/src/ap/ap_cache.c,v
retrieving revision 1.3
diff -u -r1.3 ap_cache.c
--- ap_cache.c 2000/06/12 23:55:11 1.3
+++ ap_cache.c 2000/06/23 14:34:28
@@ -132,11 +132,11 @@
     BUFF *place;
     char buffer[HUGE_STRING_LEN];
     ap_status_t ret = APR_SUCCESS;
-    int nbytes, i;
+    ap_size_t nbytes, i, o;

     if((ret = ap_cache_el_data(el, &place)) != APR_SUCCESS) return ret;
     while(ap_bread(data, buffer, HUGE_STRING_LEN, &nbytes) == APR_SUCCESS
&& nbytes) {
-        int o = 0;
+        o = 0;
         while(nbytes)
         {
             ap_bwrite(place, buffer + o, nbytes, &i);



Mime
View raw message