]> granicus.if.org Git - apache/commitdiff
Merge r1557317, r1556911, r1556914, r1555259, r1556912, r1556937, r1559351, r1463046...
authorJim Jagielski <jim@apache.org>
Tue, 28 Jan 2014 18:11:59 +0000 (18:11 +0000)
committerJim Jagielski <jim@apache.org>
Tue, 28 Jan 2014 18:11:59 +0000 (18:11 +0000)
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

git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/branches/2.4.x@1562134 13f79535-47bb-0310-9956-ffa450edef68

STATUS
modules/aaa/mod_authz_core.c
modules/core/mod_macro.c
modules/dav/fs/lock.c
modules/dav/lock/locks.c
modules/dav/main/std_liveprop.c
modules/proxy/mod_proxy.c
server/mpm/event/fdqueue.c
server/util_regex.c

diff --git a/STATUS b/STATUS
index 43c6ceb123ad70e1fe48e7ce65fedc6be2227927..19a217bbb8f2d1b130adeca0b6e667da668a908f 100644 (file)
--- a/STATUS
+++ b/STATUS
@@ -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 ]
index 9b7173c8a84051c88c1e9a9f780ac95bc0a286c5..c9ed22ff1cf162b77b51e522b31ecaa119bc2e87 100644 (file)
@@ -314,7 +314,7 @@ static const char *authz_require_alias_section(cmd_parms *cmd, void *mconfig,
                                 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,
index 34ae3ad3c67ae86eb4135f9c37cf6cd43f9e3657..831769999ed9f43a696eb47affc101dd2d0fb1b6 100644 (file)
@@ -468,7 +468,7 @@ static const char *process_content(apr_pool_t * pool,
     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 */
index a15b4b91c7a18d789f03d8fd123902190af52d04..c058e2ed05194d7d7b7a1e02ecbe4c356ce7ae39 100644 (file)
@@ -1327,6 +1327,7 @@ static int dav_fs_do_refresh(dav_lock_discovery *dp,
         {
             dp->f.timeout = new_time;
             dirty = 1;
+            break;
         }
     }
 
index 264a851a7522b3ff2fa04606d0dd7490dbac41ce..ccf972d33e4b5d769aaf13bf25a790fab6ac74b3 100644 (file)
@@ -1093,6 +1093,7 @@ static int dav_generic_do_refresh(dav_lock_discovery *dp,
         {
             dp->f.timeout = new_time;
             dirty = 1;
+            break;
         }
     }
 
index 1f79dc712875af4b5fac80e61bc944f813adab21..e760c655b5329c293f359738fcaf904c01f7a5cd 100644 (file)
@@ -86,18 +86,18 @@ static dav_prop_insert dav_core_insert_prop(const dav_resource *resource,
                     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_prop(const dav_resource *resource,
             else {
                 /* ### should we denote lock-null resources? */
                 if (value == NULL) {
-                value = "";        /* becomes: <D:resourcetype/> */
-            }
+                    value = "";        /* becomes: <D:resourcetype/> */
+                }
             }
             break;
         case DAV_RESOURCE_TYPE_HISTORY:
index 60e3e28f7a3be8225d30f6e0ed6989fff86ea50c..627a0496f9ba8014705609add1bc0c60e95a9720 100644 (file)
@@ -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) {
index 028bca106e15ee35bdff6d5f844a8217e720b389..865b8358df1091aac71fcfec22ebaafeee60dd6a 100644 (file)
 #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_)
index 73eccec761d439eeaa1dd91515555703d832712d..81eac5308d28c8095209bdda1f6cb38ff972cd4b 100644 (file)
@@ -162,7 +162,6 @@ AP_DECLARE(int) ap_rxplus_exec(apr_pool_t *pool, ap_rxplus_t *rx,
         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_pool_t *pool, ap_rxplus_t *rx, int n)
     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);
 }