You are viewing a plain text version of this content. The canonical link for it is here.
Posted to cvs@httpd.apache.org by ji...@apache.org on 2014/01/28 19:11:59 UTC

svn commit: r1562134 - in /httpd/httpd/branches/2.4.x: ./ docs/manual/ docs/manual/howto/ docs/manual/mod/ docs/manual/rewrite/ modules/aaa/ modules/core/ modules/dav/fs/ modules/dav/lock/ modules/dav/main/ modules/proxy/ server/ server/mpm/event/

Author: jim
Date: Tue Jan 28 18:11:59 2014
New Revision: 1562134

URL: http://svn.apache.org/r1562134
Log:
Merge r1557317, r1556911, r1556914, r1555259, r1556912, r1556937, r1559351, r1463046 from trunk:

Style, indentation. No functional change.

As in 'dav_generic_do_refresh', add missing break in 'dav_fs_do_refresh' to avoid useless computation.

Add missing break in 'dav_generic_do_refresh' to avoid useless computation.

Allocate correct size for the array to avoid useless memory allocation and copy

Add missing break.

Oops (fix r1556912)

No need to test for NULL, apr_pstrndup already handles it.

Remove some useless declarations that were shadowing other local
variables of the same name.

Submitted by: jailletc36, sf
Reviewed/backported by: jim

Modified:
    httpd/httpd/branches/2.4.x/   (props changed)
    httpd/httpd/branches/2.4.x/STATUS
    httpd/httpd/branches/2.4.x/docs/manual/   (props changed)
    httpd/httpd/branches/2.4.x/docs/manual/howto/   (props changed)
    httpd/httpd/branches/2.4.x/docs/manual/mod/   (props changed)
    httpd/httpd/branches/2.4.x/docs/manual/mod/mod_macro.xml   (props changed)
    httpd/httpd/branches/2.4.x/docs/manual/rewrite/   (props changed)
    httpd/httpd/branches/2.4.x/modules/aaa/mod_authz_core.c
    httpd/httpd/branches/2.4.x/modules/core/mod_macro.c
    httpd/httpd/branches/2.4.x/modules/dav/fs/lock.c
    httpd/httpd/branches/2.4.x/modules/dav/lock/locks.c
    httpd/httpd/branches/2.4.x/modules/dav/main/std_liveprop.c
    httpd/httpd/branches/2.4.x/modules/proxy/mod_proxy.c
    httpd/httpd/branches/2.4.x/server/mpm/event/fdqueue.c
    httpd/httpd/branches/2.4.x/server/util_regex.c

Propchange: httpd/httpd/branches/2.4.x/
------------------------------------------------------------------------------
  Merged /httpd/httpd/trunk:r1463046,1555259,1556911-1556912,1556914,1556937,1557317,1559351

Modified: httpd/httpd/branches/2.4.x/STATUS
URL: http://svn.apache.org/viewvc/httpd/httpd/branches/2.4.x/STATUS?rev=1562134&r1=1562133&r2=1562134&view=diff
==============================================================================
--- httpd/httpd/branches/2.4.x/STATUS (original)
+++ httpd/httpd/branches/2.4.x/STATUS Tue Jan 28 18:11:59 2014
@@ -98,25 +98,6 @@ RELEASE SHOWSTOPPERS:
 PATCHES ACCEPTED TO BACKPORT FROM TRUNK:
   [ start all new proposals below, under PATCHES PROPOSED. ]
 
-  * Easy proposals, synch 2.4 and trunk:
-      mod_dav: Style, indentation. No functional change.
-      mod_dav: Add missing break in 'dav_generic_do_refresh' to avoid useless computation
-      mod_dav: Add missing break in 'dav_fs_do_refresh' to avoid useless computation
-      mod_macro: Allocate correct size for the array to avoid useless memory allocation and copy
-      mod_proxy: Add missing break.
-      mod_proxy: oops (fix r1556912)
-      server/regex: No need to test for NULL, apr_pstrndup already handles it.
-      various: Remove some useless declarations that were shadowing other local variables of the same name.
-    trunk patches: http://svn.apache.org/r1557317
-                   http://svn.apache.org/r1556911
-                   http://svn.apache.org/r1556914
-                   http://svn.apache.org/r1555259
-                   http://svn.apache.org/r1556912
-                   http://svn.apache.org/r1556937
-                   http://svn.apache.org/r1559351
-                   http://svn.apache.org/r1463046
-     2.4.x patch: http://people.apache.org/~jailletc36/backport6.patch
-     +1: jailletc36, jim, trawick
 
 PATCHES PROPOSED TO BACKPORT FROM TRUNK:
   [ New proposals should be added at the end of the list ]

Propchange: httpd/httpd/branches/2.4.x/docs/manual/
------------------------------------------------------------------------------
  Merged /httpd/httpd/trunk/docs/manual:r1463046,1555259,1556911-1556912,1556914,1556937,1557317,1559351

Propchange: httpd/httpd/branches/2.4.x/docs/manual/howto/
------------------------------------------------------------------------------
  Merged /httpd/httpd/trunk/docs/manual/howto:r1463046,1555259,1556911-1556912,1556914,1556937,1557317,1559351

Propchange: httpd/httpd/branches/2.4.x/docs/manual/mod/
------------------------------------------------------------------------------
  Merged /httpd/httpd/trunk/docs/manual/mod:r1463046,1555259,1556911-1556912,1556914,1556937,1557317,1559351

Propchange: httpd/httpd/branches/2.4.x/docs/manual/mod/mod_macro.xml
------------------------------------------------------------------------------
  Merged /httpd/httpd/trunk/docs/manual/mod/mod_macro.xml:r1463046,1555259,1556911-1556912,1556914,1556937,1557317,1559351

Propchange: httpd/httpd/branches/2.4.x/docs/manual/rewrite/
------------------------------------------------------------------------------
  Merged /httpd/httpd/trunk/docs/manual/rewrite:r1463046,1555259,1556911-1556912,1556914,1556937,1557317,1559351

Modified: httpd/httpd/branches/2.4.x/modules/aaa/mod_authz_core.c
URL: http://svn.apache.org/viewvc/httpd/httpd/branches/2.4.x/modules/aaa/mod_authz_core.c?rev=1562134&r1=1562133&r2=1562134&view=diff
==============================================================================
--- httpd/httpd/branches/2.4.x/modules/aaa/mod_authz_core.c (original)
+++ httpd/httpd/branches/2.4.x/modules/aaa/mod_authz_core.c Tue Jan 28 18:11:59 2014
@@ -314,7 +314,7 @@ static const char *authz_require_alias_s
                                 provider_name);
         }
         if (prvdraliasrec->provider->parse_require_line) {
-            const char *err = prvdraliasrec->provider->parse_require_line(cmd,
+            err = prvdraliasrec->provider->parse_require_line(cmd,
                          provider_args, &prvdraliasrec->provider_parsed_args);
             if (err)
                 return apr_psprintf(cmd->pool,

Modified: httpd/httpd/branches/2.4.x/modules/core/mod_macro.c
URL: http://svn.apache.org/viewvc/httpd/httpd/branches/2.4.x/modules/core/mod_macro.c?rev=1562134&r1=1562133&r2=1562134&view=diff
==============================================================================
--- httpd/httpd/branches/2.4.x/modules/core/mod_macro.c (original)
+++ httpd/httpd/branches/2.4.x/modules/core/mod_macro.c Tue Jan 28 18:11:59 2014
@@ -468,7 +468,7 @@ static const char *process_content(apr_p
     int i;
 
     if (result) {
-        *result = apr_array_make(pool, 1, sizeof(char *));
+        *result = apr_array_make(pool, contents->nelts, sizeof(char *));
     }
 
     /* for each line of the macro body */

Modified: httpd/httpd/branches/2.4.x/modules/dav/fs/lock.c
URL: http://svn.apache.org/viewvc/httpd/httpd/branches/2.4.x/modules/dav/fs/lock.c?rev=1562134&r1=1562133&r2=1562134&view=diff
==============================================================================
--- httpd/httpd/branches/2.4.x/modules/dav/fs/lock.c (original)
+++ httpd/httpd/branches/2.4.x/modules/dav/fs/lock.c Tue Jan 28 18:11:59 2014
@@ -1327,6 +1327,7 @@ static int dav_fs_do_refresh(dav_lock_di
         {
             dp->f.timeout = new_time;
             dirty = 1;
+            break;
         }
     }
 

Modified: httpd/httpd/branches/2.4.x/modules/dav/lock/locks.c
URL: http://svn.apache.org/viewvc/httpd/httpd/branches/2.4.x/modules/dav/lock/locks.c?rev=1562134&r1=1562133&r2=1562134&view=diff
==============================================================================
--- httpd/httpd/branches/2.4.x/modules/dav/lock/locks.c (original)
+++ httpd/httpd/branches/2.4.x/modules/dav/lock/locks.c Tue Jan 28 18:11:59 2014
@@ -1093,6 +1093,7 @@ static int dav_generic_do_refresh(dav_lo
         {
             dp->f.timeout = new_time;
             dirty = 1;
+            break;
         }
     }
 

Modified: httpd/httpd/branches/2.4.x/modules/dav/main/std_liveprop.c
URL: http://svn.apache.org/viewvc/httpd/httpd/branches/2.4.x/modules/dav/main/std_liveprop.c?rev=1562134&r1=1562133&r2=1562134&view=diff
==============================================================================
--- httpd/httpd/branches/2.4.x/modules/dav/main/std_liveprop.c (original)
+++ httpd/httpd/branches/2.4.x/modules/dav/main/std_liveprop.c Tue Jan 28 18:11:59 2014
@@ -86,18 +86,18 @@ static dav_prop_insert dav_core_insert_p
                     continue;
 
                 if (!res_hooks->get_resource_type(resource, &name, &uri) &&
-            name) {
+                    name) {
 
                     if (!uri || !strcasecmp(uri, "DAV:"))
                         value = apr_pstrcat(p, value ? value : "",
-                        "<D:", name, "/>", NULL);
-            else
+                                            "<D:", name, "/>", NULL);
+                    else
                         value = apr_pstrcat(p, value ? value : "",
-                        "<x:", name,
-                        " xmlns:x=\"", uri,
-                        "\"/>", NULL);
+                                            "<x:", name,
+                                            " xmlns:x=\"", uri,
+                                            "\"/>", NULL);
                 }
-        }
+            }
         }
         switch (resource->type) {
         case DAV_RESOURCE_TYPE_VERSION:
@@ -114,8 +114,8 @@ static dav_prop_insert dav_core_insert_p
             else {
                 /* ### should we denote lock-null resources? */
                 if (value == NULL) {
-                value = "";        /* becomes: <D:resourcetype/> */
-            }
+                    value = "";        /* becomes: <D:resourcetype/> */
+                }
             }
             break;
         case DAV_RESOURCE_TYPE_HISTORY:

Modified: httpd/httpd/branches/2.4.x/modules/proxy/mod_proxy.c
URL: http://svn.apache.org/viewvc/httpd/httpd/branches/2.4.x/modules/proxy/mod_proxy.c?rev=1562134&r1=1562133&r2=1562134&view=diff
==============================================================================
--- httpd/httpd/branches/2.4.x/modules/proxy/mod_proxy.c (original)
+++ httpd/httpd/branches/2.4.x/modules/proxy/mod_proxy.c Tue Jan 28 18:11:59 2014
@@ -1726,6 +1726,7 @@ static const char *
     for (i = 0; i < conf->noproxies->nelts; i++) {
         if (strcasecmp(arg, list[i].name) == 0) { /* ignore case for host names */
             found = 1;
+            break;
         }
     }
 
@@ -1759,8 +1760,10 @@ static const char *
 
     /* Don't duplicate entries */
     for (i = 0; i < conf->dirconn->nelts; i++) {
-        if (strcasecmp(arg, list[i].name) == 0)
+        if (strcasecmp(arg, list[i].name) == 0) {
             found = 1;
+            break;
+        }
     }
 
     if (!found) {

Modified: httpd/httpd/branches/2.4.x/server/mpm/event/fdqueue.c
URL: http://svn.apache.org/viewvc/httpd/httpd/branches/2.4.x/server/mpm/event/fdqueue.c?rev=1562134&r1=1562133&r2=1562134&view=diff
==============================================================================
--- httpd/httpd/branches/2.4.x/server/mpm/event/fdqueue.c (original)
+++ httpd/httpd/branches/2.4.x/server/mpm/event/fdqueue.c Tue Jan 28 18:11:59 2014
@@ -17,11 +17,11 @@
 #include "fdqueue.h"
 #include "apr_atomic.h"
 
-typedef struct recycled_pool
+struct recycled_pool
 {
     apr_pool_t *pool;
     struct recycled_pool *next;
-} recycled_pool;
+};
 
 struct fd_queue_info_t
 {
@@ -36,7 +36,7 @@ struct fd_queue_info_t
     int max_idlers;
     int max_recycled_pools;
     apr_uint32_t recycled_pools_count;
-    recycled_pool *recycled_pools;
+    struct recycled_pool *recycled_pools;
 };
 
 static apr_status_t queue_info_cleanup(void *data_)

Modified: httpd/httpd/branches/2.4.x/server/util_regex.c
URL: http://svn.apache.org/viewvc/httpd/httpd/branches/2.4.x/server/util_regex.c?rev=1562134&r1=1562133&r2=1562134&view=diff
==============================================================================
--- httpd/httpd/branches/2.4.x/server/util_regex.c (original)
+++ httpd/httpd/branches/2.4.x/server/util_regex.c Tue Jan 28 18:11:59 2014
@@ -162,7 +162,6 @@ AP_DECLARE(int) ap_rxplus_exec(apr_pool_
         remainder = pattern + startl + oldl;
         if (rx->flags & AP_REG_MULTI) {
             /* recurse to do any further matches */
-            char *subs;
             ret += ap_rxplus_exec(pool, rx, remainder, &subs);
             if (ret > 1) {
                 /* a further substitution happened */
@@ -206,5 +205,5 @@ AP_DECLARE(char*) ap_rxplus_pmatch(apr_p
     int len;
     const char *match;
     ap_rxplus_match(rx, n, &len, &match);
-    return (match != NULL) ? apr_pstrndup(pool, match, len) : NULL;
+    return apr_pstrndup(pool, match, len);
 }