httpd-cvs mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From n..@apache.org
Subject svn commit: r559449 - in /httpd/httpd/branches/2.2.x: STATUS modules/cache/cache_cache.c modules/mappers/mod_rewrite.c server/mpm/experimental/event/fdqueue.c server/mpm/worker/fdqueue.c server/request.c server/util.c support/htcacheclean.c
Date Wed, 25 Jul 2007 13:13:57 GMT
Author: niq
Date: Wed Jul 25 06:13:49 2007
New Revision: 559449

URL: http://svn.apache.org/viewvc?view=rev&rev=559449
Log:
Backport trivial cleanups

Modified:
    httpd/httpd/branches/2.2.x/STATUS
    httpd/httpd/branches/2.2.x/modules/cache/cache_cache.c
    httpd/httpd/branches/2.2.x/modules/mappers/mod_rewrite.c
    httpd/httpd/branches/2.2.x/server/mpm/experimental/event/fdqueue.c
    httpd/httpd/branches/2.2.x/server/mpm/worker/fdqueue.c
    httpd/httpd/branches/2.2.x/server/request.c
    httpd/httpd/branches/2.2.x/server/util.c
    httpd/httpd/branches/2.2.x/support/htcacheclean.c

Modified: httpd/httpd/branches/2.2.x/STATUS
URL: http://svn.apache.org/viewvc/httpd/httpd/branches/2.2.x/STATUS?view=diff&rev=559449&r1=559448&r2=559449
==============================================================================
--- httpd/httpd/branches/2.2.x/STATUS (original)
+++ httpd/httpd/branches/2.2.x/STATUS Wed Jul 25 06:13:49 2007
@@ -257,36 +257,6 @@
         http://people.apache.org/~jfclere/patches/ProxyIOBufferSize.1.patch
       +1: jfclere, mturk
 
-    * support/htcacheclean.c:	Trivial cleanups
-      PR: 38699 - Christophe JAILLET
-      http://svn.apache.org/viewvc?view=rev&revision=557837
-      +1: niq, trawick, rpluem
-
-    * mod_cache:	Trivial cleanups
-      PR: 42005 - Christophe JAILLET
-      http://svn.apache.org/viewvc?view=rev&revision=557837
-      +1: niq, trawick, rpluem
-
-    * server/request.c:	Trivial cleanups
-      PR: 42006 - Christophe JAILLET
-      http://svn.apache.org/viewvc?view=rev&revision=557837
-      +1: niq, trawicki, rpluem
-
-    * Worker and Event MPMs: Trivial cleanups
-      PR: 42007 - Christophe JAILLET
-      http://svn.apache.org/viewvc?view=rev&revision=557837
-      +1: niq, trawick, rpluem
-
-    * server/util.c, modules/mappers/mod_rewrite.c: Trivial cleanups
-      PR: 42009 - Christophe JAILLET
-      http://svn.apache.org/viewvc?view=rev&revision=557837
-      +1: niq, trawick
-      -1: rpluem says: This creates a bug. Please add
-          http://svn.apache.org/viewvc?view=rev&rev=558133
-          to the proposal and you have my +1.
-       niq: agrees with rpluem, and points to my post to dev@httpd
-       from this morning.  This trivial cleanup is r557837+r558133.
-
     * multiple files,	Trivial cleanups
       PR: 39518 - Christophe JAILLET
       http://svn.apache.org/viewvc?view=rev&revision=557837

Modified: httpd/httpd/branches/2.2.x/modules/cache/cache_cache.c
URL: http://svn.apache.org/viewvc/httpd/httpd/branches/2.2.x/modules/cache/cache_cache.c?view=diff&rev=559449&r1=559448&r2=559449
==============================================================================
--- httpd/httpd/branches/2.2.x/modules/cache/cache_cache.c (original)
+++ httpd/httpd/branches/2.2.x/modules/cache/cache_cache.c Wed Jul 25 06:13:49 2007
@@ -85,13 +85,7 @@
 
 CACHE_DECLARE(void*) cache_find(cache_cache_t* c, const char *key)
 {
-    void *e;
-
-    e = cache_hash_get(c->ht, key, CACHE_HASH_KEY_STRING);
-    if (!e)
-        return NULL;
-
-    return e;
+    return cache_hash_get(c->ht, key, CACHE_HASH_KEY_STRING);
 }
 
 CACHE_DECLARE(void) cache_update(cache_cache_t* c, void *entry)

Modified: httpd/httpd/branches/2.2.x/modules/mappers/mod_rewrite.c
URL: http://svn.apache.org/viewvc/httpd/httpd/branches/2.2.x/modules/mappers/mod_rewrite.c?view=diff&rev=559449&r1=559448&r2=559449
==============================================================================
--- httpd/httpd/branches/2.2.x/modules/mappers/mod_rewrite.c (original)
+++ httpd/httpd/branches/2.2.x/modules/mappers/mod_rewrite.c Wed Jul 25 06:13:49 2007
@@ -1061,11 +1061,7 @@
 
 static char *rewrite_mapfunc_tolower(request_rec *r, char *key)
 {
-    char *p;
-
-    for (p = key; *p; ++p) {
-        *p = apr_tolower(*p);
-    }
+    ap_str_tolower(key);
 
     return key;
 }

Modified: httpd/httpd/branches/2.2.x/server/mpm/experimental/event/fdqueue.c
URL: http://svn.apache.org/viewvc/httpd/httpd/branches/2.2.x/server/mpm/experimental/event/fdqueue.c?view=diff&rev=559449&r1=559448&r2=559449
==============================================================================
--- httpd/httpd/branches/2.2.x/server/mpm/experimental/event/fdqueue.c (original)
+++ httpd/httpd/branches/2.2.x/server/mpm/experimental/event/fdqueue.c Wed Jul 25 06:13:49
2007
@@ -65,8 +65,7 @@
     apr_status_t rv;
     fd_queue_info_t *qi;
 
-    qi = apr_palloc(pool, sizeof(*qi));
-    memset(qi, 0, sizeof(*qi));
+    qi = apr_pcalloc(pool, sizeof(*qi));
 
     rv = apr_thread_mutex_create(&qi->idlers_mutex, APR_THREAD_MUTEX_DEFAULT,
                                  pool);

Modified: httpd/httpd/branches/2.2.x/server/mpm/worker/fdqueue.c
URL: http://svn.apache.org/viewvc/httpd/httpd/branches/2.2.x/server/mpm/worker/fdqueue.c?view=diff&rev=559449&r1=559448&r2=559449
==============================================================================
--- httpd/httpd/branches/2.2.x/server/mpm/worker/fdqueue.c (original)
+++ httpd/httpd/branches/2.2.x/server/mpm/worker/fdqueue.c Wed Jul 25 06:13:49 2007
@@ -58,8 +58,7 @@
     apr_status_t rv;
     fd_queue_info_t *qi;
 
-    qi = apr_palloc(pool, sizeof(*qi));
-    memset(qi, 0, sizeof(*qi));
+    qi = apr_pcalloc(pool, sizeof(*qi));
 
     rv = apr_thread_mutex_create(&qi->idlers_mutex, APR_THREAD_MUTEX_DEFAULT,
                                  pool);

Modified: httpd/httpd/branches/2.2.x/server/request.c
URL: http://svn.apache.org/viewvc/httpd/httpd/branches/2.2.x/server/request.c?view=diff&rev=559449&r1=559448&r2=559449
==============================================================================
--- httpd/httpd/branches/2.2.x/server/request.c (original)
+++ httpd/httpd/branches/2.2.x/server/request.c Wed Jul 25 06:13:49 2007
@@ -1742,9 +1742,9 @@
         /* ap_make_full_path overallocated the buffers
          * by one character to help us out here.
          */
-        strcpy(rnew->filename + strlen(rnew->filename), "/");
+        strcat(rnew->filename, "/");
         if (!rnew->path_info || !*rnew->path_info) {
-            strcpy(rnew->uri  + strlen(rnew->uri ), "/");
+            strcat(rnew->uri, "/");
         }
     }
 

Modified: httpd/httpd/branches/2.2.x/server/util.c
URL: http://svn.apache.org/viewvc/httpd/httpd/branches/2.2.x/server/util.c?view=diff&rev=559449&r1=559448&r2=559449
==============================================================================
--- httpd/httpd/branches/2.2.x/server/util.c (original)
+++ httpd/httpd/branches/2.2.x/server/util.c Wed Jul 25 06:13:49 2007
@@ -2074,10 +2074,9 @@
     if (semi) {
         *semi = '\0';
     }
-    while (*str) {
-        *str = apr_tolower(*str);
-        ++str;
-    }
+
+    ap_str_tolower(str);
+
     if (semi) {
         *semi = ';';
     }

Modified: httpd/httpd/branches/2.2.x/support/htcacheclean.c
URL: http://svn.apache.org/viewvc/httpd/httpd/branches/2.2.x/support/htcacheclean.c?view=diff&rev=559449&r1=559448&r2=559449
==============================================================================
--- httpd/httpd/branches/2.2.x/support/htcacheclean.c (original)
+++ httpd/httpd/branches/2.2.x/support/htcacheclean.c Wed Jul 25 06:13:49 2007
@@ -473,9 +473,7 @@
                             e->dtime = d->dtime;
                             e->hsize = d->hsize;
                             e->dsize = d->dsize;
-                            e->basename = apr_palloc(pool,
-                                                     strlen(d->basename) + 1);
-                            strcpy(e->basename, d->basename);
+                            e->basename = apr_pstrdup(pool, d->basename);
                             break;
                         }
                         else {



Mime
View raw message