httpd-cvs mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From rpl...@apache.org
Subject svn commit: r1497239 - /httpd/httpd/trunk/server/skiplist.c
Date Thu, 27 Jun 2013 08:34:14 GMT
Author: rpluem
Date: Thu Jun 27 08:34:14 2013
New Revision: 1497239

URL: http://svn.apache.org/r1497239
Log:
* Make code C89 compatible again

Modified:
    httpd/httpd/trunk/server/skiplist.c

Modified: httpd/httpd/trunk/server/skiplist.c
URL: http://svn.apache.org/viewvc/httpd/httpd/trunk/server/skiplist.c?rev=1497239&r1=1497238&r2=1497239&view=diff
==============================================================================
--- httpd/httpd/trunk/server/skiplist.c (original)
+++ httpd/httpd/trunk/server/skiplist.c Thu Jun 27 08:34:14 2013
@@ -83,13 +83,15 @@ AP_DECLARE(void *) ap_skiplist_alloc(ap_
     if (sl->pool) {
         void *ptr;
         int found_size = 0;
+        int i;
         chunk_t *newchunk;
         memlist_t *memlist = (memlist_t *)sl->memlist->elts;
-        for (int i = 0; i < sl->memlist->nelts; i++) {
+        for (i = 0; i < sl->memlist->nelts; i++) {
             if (memlist->size == size) {
+                int j;
                 chunk_t *chunk = (chunk_t *)memlist->list->elts;
                 found_size = 1;
-                for (int j = 0; j < memlist->list->nelts; j++) {
+                for (j = 0; j < memlist->list->nelts; j++) {
                     if (!chunk->inuse) {
                         chunk->inuse = 1;
                         return chunk->ptr;
@@ -130,10 +132,12 @@ AP_DECLARE(void) ap_skiplist_free(ap_ski
         free(mem);
     }
     else {
+        int i;
         memlist_t *memlist = (memlist_t *)sl->memlist->elts;
-        for (int i = 0; i < sl->memlist->nelts; i++) {
+        for (i = 0; i < sl->memlist->nelts; i++) {
+            int j;
             chunk_t *chunk = (chunk_t *)memlist->list->elts;
-            for (int j = 0; j < memlist->list->nelts; j++) {
+            for (j = 0; j < memlist->list->nelts; j++) {
                 if (chunk->ptr == mem) {
                     chunk->inuse = 0;
                     return;



Mime
View raw message