]> granicus.if.org Git - apache/commitdiff
Merge r1533065, r1491724, r1425360, r1496194 from trunk:
authorJim Jagielski <jim@apache.org>
Fri, 15 Nov 2013 17:07:52 +0000 (17:07 +0000)
committerJim Jagielski <jim@apache.org>
Fri, 15 Nov 2013 17:07:52 +0000 (17:07 +0000)
Eclipse code analysis warning

Reduce stack usage by 3k

style fixes, add comment

no code change

attribute and error reason reversed

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

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

STATUS
modules/aaa/mod_authnz_ldap.c
modules/loggers/mod_log_config.c
modules/metadata/mod_mime_magic.c
modules/proxy/mod_proxy.c

diff --git a/STATUS b/STATUS
index f47a452b935a3a08bbe868fa223a750db0373ce5..d6a7db7227dd7bc364e08683cad9c973c648370a 100644 (file)
--- a/STATUS
+++ b/STATUS
@@ -97,19 +97,6 @@ RELEASE SHOWSTOPPERS:
 PATCHES ACCEPTED TO BACKPORT FROM TRUNK:
   [ start all new proposals below, under PATCHES PROPOSED. ]
 
-  * easy proposals to synch 2.4.x and trunk
-       - mod_proxy.c: Eclipse code analysis warning
-       - mod_mime_magic.c: Reduce stack usage by 3k
-       - mod_log_config.c: style fixes, add comment, no code change
-       - mod_authnz_ldap.c: attribute and error reason reversed
-    trunk patches:
-       - http://svn.apache.org/r1533065
-       - http://svn.apache.org/r1491724
-       - http://svn.apache.org/r1425360
-       - http://svn.apache.org/r1496194
-    2.4.x patch: trunk patches work
-    +1: jailletc36, jim, jorton
-
   * mod_proxy_fcgi: Sync with trunk
     trunk patch: https://svn.apache.org/viewvc?view=revision&revision=1523281
                  https://svn.apache.org/viewvc?view=revision&revision=1524368
index 2c25dbc73f149e6ee06a69b8ea57fa01c255882f..d46eeb44ed27abecf49f83b8072e8577b76d9067 100644 (file)
@@ -894,7 +894,7 @@ static authz_status ldapgroup_check_authorization(request_rec *r,
                 ap_log_rerror(APLOG_MARK, APLOG_DEBUG, 0, r, APLOGNO(01719)
                               "auth_ldap authorize: require group \"%s\": "
                               "didn't match with attr %s [%s][%d - %s]",
-                              t, ldc->reason, ent[i].name, result, 
+                              t, ent[i].name, ldc->reason, result, 
                               ldap_err2string(result));
         }
     }
index e1a82041712c0261add4c5cb8aab4cd97ddd0506..f17e1641561b38283bf6defbe385a75fc3711247 100644 (file)
@@ -194,8 +194,8 @@ static void *ap_default_log_writer_init(apr_pool_t *p, server_rec *s,
 static void *ap_buffered_log_writer_init(apr_pool_t *p, server_rec *s,
                                         const char* name);
 
-static ap_log_writer_initap_log_set_writer_init(ap_log_writer_init *handle);
-static ap_log_writerap_log_set_writer(ap_log_writer *handle);
+static ap_log_writer_init *ap_log_set_writer_init(ap_log_writer_init *handle);
+static ap_log_writer *ap_log_set_writer(ap_log_writer *handle);
 static ap_log_writer *log_writer = ap_default_log_writer;
 static ap_log_writer_init *log_writer_init = ap_default_log_writer_init;
 static int buffered_logs = 0; /* default unbuffered */
@@ -1507,7 +1507,7 @@ static void ap_register_log_handler(apr_pool_t *p, char *tag,
 
     apr_hash_set(log_hash, tag, 1, (const void *)log_struct);
 }
-static ap_log_writer_initap_log_set_writer_init(ap_log_writer_init *handle)
+static ap_log_writer_init *ap_log_set_writer_init(ap_log_writer_init *handle)
 {
     ap_log_writer_init *old = log_writer_init;
     log_writer_init = handle;
@@ -1536,6 +1536,10 @@ static apr_status_t ap_default_log_writer( request_rec *r,
     int i;
     apr_status_t rv;
 
+    /*
+     * We do this memcpy dance because write() is atomic for len < PIPE_BUF,
+     * while writev() need not be.
+     */
     str = apr_palloc(r->pool, len + 1);
 
     for (i = 0, s = str; i < nelts; ++i) {
@@ -1616,6 +1620,10 @@ static apr_status_t ap_buffered_log_writer(request_rec *r,
     if (len >= LOG_BUFSIZE) {
         apr_size_t w;
 
+        /*
+         * We do this memcpy dance because write() is atomic for
+         * len < PIPE_BUF, while writev() need not be.
+         */
         str = apr_palloc(r->pool, len + 1);
         for (i = 0, s = str; i < nelts; ++i) {
             memcpy(s, strs[i], strl[i]);
index 03226aca5edfbcc015fe7970f1ead0407a1dca21..693ceca80802a0f007dc6a5c65a4ab8be1de05bd 100644 (file)
@@ -1973,7 +1973,7 @@ static int ascmagic(request_rec *r, unsigned char *buf, apr_size_t nbytes)
 {
     int has_escapes = 0;
     unsigned char *s;
-    char nbuf[HOWMANY + 1];  /* one extra for terminating '\0' */
+    char nbuf[SMALL_HOWMANY + 1];  /* one extra for terminating '\0' */
     char *token;
     const struct names *p;
     int small_nbytes;
index b2092a78676ea55bfaa9e3390b5f48cfb7dcc884..88ddb899890eb550ab49c3fac95f98676ec14431 100644 (file)
@@ -2439,7 +2439,7 @@ static int proxy_status_hook(request_rec *r, int flags)
     proxy_balancer *balancer = NULL;
     proxy_worker **worker = NULL;
 
-    if (flags & AP_STATUS_SHORT || conf->balancers->nelts == 0 ||
+    if ((flags & AP_STATUS_SHORT) || conf->balancers->nelts == 0 ||
         conf->proxy_status == status_off)
         return OK;