You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@tomcat.apache.org by rj...@apache.org on 2022/06/23 17:59:49 UTC

[tomcat-connectors] branch main updated: Fix indentation and similar style issues - no functional change

This is an automated email from the ASF dual-hosted git repository.

rjung pushed a commit to branch main
in repository https://gitbox.apache.org/repos/asf/tomcat-connectors.git


The following commit(s) were added to refs/heads/main by this push:
     new d32a65124 Fix indentation and similar style issues - no functional change
d32a65124 is described below

commit d32a65124e00290a36a91e35e74b58a94a7b344c
Author: Rainer Jung <ra...@kippdata.de>
AuthorDate: Thu Jun 23 19:59:37 2022 +0200

    Fix indentation and similar style issues - no functional change
---
 native/apache-2.0/mod_jk.c        |  37 ++++++-------
 native/common/ap_snprintf.c       |  40 +++++++-------
 native/common/jk_ajp12_worker.c   |   3 +-
 native/common/jk_ajp14.c          |   2 +-
 native/common/jk_ajp_common.c     | 110 +++++++++++++++++++-------------------
 native/common/jk_connect.c        |  20 +++----
 native/common/jk_lb_worker.c      |  10 ++--
 native/common/jk_map.c            |   6 +--
 native/common/jk_shm.c            |   8 +--
 native/common/jk_status.c         |  43 +++++++--------
 native/common/jk_uri_worker_map.c |  52 +++++++++---------
 native/common/jk_util.c           |  14 ++---
 native/common/jk_worker.c         |   8 +--
 native/iis/jk_isapi_plugin.c      |  60 +++++++++++----------
 14 files changed, 213 insertions(+), 200 deletions(-)

diff --git a/native/apache-2.0/mod_jk.c b/native/apache-2.0/mod_jk.c
index 745dc6b50..b6b9b9d95 100644
--- a/native/apache-2.0/mod_jk.c
+++ b/native/apache-2.0/mod_jk.c
@@ -745,7 +745,7 @@ static void jk_error_exit(const char *file,
 #else
     ap_log_error(file, line, level, 0, s, "%s", res);
 #endif
-    if ( s ) {
+    if (s) {
 #if (MODULE_MAGIC_NUMBER_MAJOR >= 20100606)
         ap_log_error(file, line, APLOG_MODULE_INDEX, level, 0, NULL, "%s", res);
 #else
@@ -838,7 +838,8 @@ static int init_ws_service(apache_private_data_t * private_data,
         if (conf->options & JK_OPT_FWDPHYSICAL) {
             s->remote_addr = r->connection->client_ip;
             s->remote_port = apr_itoa(r->pool, r->connection->client_addr->port);
-        } else {
+        }
+        else {
             s->remote_addr = r->useragent_ip;
             s->remote_port = apr_itoa(r->pool, r->useragent_addr->port);
         }
@@ -1259,7 +1260,7 @@ static const char *jk_mount_context(cmd_parms * cmd,
                                                   &jk_module);
     const char *c, *w;
 
-    if (worker != NULL && cmd->path == NULL ) {
+    if (worker != NULL && cmd->path == NULL) {
         c = context;
         w = worker;
     }
@@ -1307,7 +1308,7 @@ static const char *jk_unmount_context(cmd_parms * cmd,
     char *uri;
     const char *c, *w;
 
-    if (worker != NULL && cmd->path == NULL ) {
+    if (worker != NULL && cmd->path == NULL) {
         c = context;
         w = worker;
     }
@@ -2744,9 +2745,9 @@ static int jk_handler(request_rec * r)
     worker_name = apr_table_get(r->notes, JK_NOTE_WORKER_NAME);
 
     if (worker_name == NULL) {
-        /* we may be here because of a manual directive ( that overrides
+        /* we may be here because of a manual directive (that overrides
            translate and
-           sets the handler directly ). We still need to know the worker.
+           sets the handler directly). We still need to know the worker.
          */
         worker_name = apr_table_get(r->subprocess_env, xconf->worker_indicator);
         if (worker_name) {
@@ -2768,9 +2769,9 @@ static int jk_handler(request_rec * r)
             }
         }
         else if (worker_env.num_of_workers == 1) {
-          /** We have a single worker ( the common case ).
-              ( lb is a bit special, it should count as a single worker but
-              I'm not sure how ). We also have a manual config directive that
+          /** We have a single worker (the common case).
+              (lb is a bit special, it should count as a single worker but
+              I'm not sure how). We also have a manual config directive that
               explicitly give control to us. */
             worker_name = worker_env.worker_list[0];
             if (JK_IS_DEBUG_LEVEL(xconf->log))
@@ -2827,8 +2828,8 @@ static int jk_handler(request_rec * r)
     /* If this is a proxy request, we'll notify an error */
     if (r->proxyreq) {
         jk_log(xconf->log, JK_LOG_INFO, "Proxy request for worker=%s"
-              " is not allowed",
-              STRNULL_FOR_NULL(worker_name));
+               " is not allowed",
+               STRNULL_FOR_NULL(worker_name));
         JK_TRACE_EXIT(xconf->log);
         return HTTP_INTERNAL_SERVER_ERROR;
     }
@@ -2885,7 +2886,7 @@ static int jk_handler(request_rec * r)
             if (init_ws_service(&private_data, &s, xconf)) {
                 jk_endpoint_t *end = NULL;
 
-                /* Use per/thread pool ( or "context" ) to reuse the
+                /* Use per/thread pool (or "context") to reuse the
                    endpoint. It's a bit faster, but I don't know
                    how to deal with load balancing - but it's usefull for JNI
                  */
@@ -3476,13 +3477,13 @@ static void jk_child_init(apr_pool_t * pconf, server_rec * s)
 }
 
 /** Initialize jk, using worker.properties.
-    We also use apache commands ( JkWorker, etc), but this use is
+    We also use apache commands (JkWorker, etc), but this use is
     deprecated, as we'll try to concentrate all config in
     workers.properties, urimap.properties, and ajp14 autoconf.
 
     Apache config will only be used for manual override, using
-    SetHandler and normal apache directives ( but minimal jk-specific
-    stuff )
+    SetHandler and normal apache directives (but minimal jk-specific
+    stuff)
 */
 static int init_jk(apr_pool_t * pconf, jk_server_conf_t * conf,
                     server_rec * s)
@@ -3731,7 +3732,7 @@ static int jk_post_config(apr_pool_t * pconf,
                                     return HTTP_INTERNAL_SERVER_ERROR;
                                 item->name = elts[i].key;
                                 envvar_def = apr_table_get(sconf->envvars_def, elts[i].key);
-                                if (envvar_def && !strcmp("1", envvar_def) ) {
+                                if (envvar_def && !strcmp("1", envvar_def)) {
                                     item->value = elts[i].val;
                                     item->has_default = 1;
                                 }
@@ -4028,7 +4029,7 @@ static int jk_map_to_storage(request_rec * r)
             if (strlen(r->uri) == 0) {
                 jk_log(conf->log, JK_LOG_DEBUG,
                        "File based (sub-)request for file=%s. No URI to match.",
-					   r->filename);
+                       r->filename);
                 JK_TRACE_EXIT(conf->log);
                 return DECLINED;
             }
@@ -4085,7 +4086,7 @@ static int jk_map_to_storage(request_rec * r)
                     return DECLINED;
                 }
             }
-		JK_TRACE_EXIT(conf->log);
+            JK_TRACE_EXIT(conf->log);
         }
     }
 
diff --git a/native/common/ap_snprintf.c b/native/common/ap_snprintf.c
index 1877d2041..931b7ca73 100644
--- a/native/common/ap_snprintf.c
+++ b/native/common/ap_snprintf.c
@@ -264,14 +264,14 @@ static char *ap_gcvt(double number, int ndigit, char *buf, boolean_e altform)
                 cc++;                                           \
             }
 
-#define NUM( c )                        ( c - '0' )
-
-#define STR_TO_DEC( str, num )          \
-    num = NUM( *str++ ) ;               \
-    while ( ap_isdigit( *str ) )                \
-    {                                   \
-        num *= 10 ;                     \
-        num += NUM( *str++ ) ;          \
+#define NUM(c)                          (c - '0')
+
+#define STR_TO_DEC(str, num)                \
+    num = NUM(*str++);                      \
+    while (ap_isdigit(*str))                \
+    {                                       \
+        num *= 10;                          \
+        num += NUM(*str++);                 \
     }
 
 /*
@@ -284,13 +284,13 @@ static char *ap_gcvt(double number, int ndigit, char *buf, boolean_e altform)
  * NOTE: this makes use of the magic info that s is
  * always based on num_buf with a size of NUM_BUF_SIZE.
  */
-#define FIX_PRECISION( adjust, precision, s, s_len )    \
-    if ( adjust ) {                                     \
+#define FIX_PRECISION(adjust, precision, s, s_len)      \
+    if (adjust) {                                       \
         int p = precision < NUM_BUF_SIZE - 1 ? precision : NUM_BUF_SIZE - 1; \
-        while ( s_len < p )                             \
+        while (s_len < p)                               \
         {                                               \
-            *--s = '0' ;                                \
-            s_len++ ;                                   \
+            *--s = '0';                                 \
+            s_len++;                                    \
         }                                               \
     }
 
@@ -298,19 +298,19 @@ static char *ap_gcvt(double number, int ndigit, char *buf, boolean_e altform)
  * Macro that does padding. The padding is done by printing
  * the character ch.
  */
-#define PAD( width, len, ch )   do              \
+#define PAD(width, len, ch)   do                \
         {                                       \
-            INS_CHAR( ch, sp, bep, cc ) ;       \
-            width-- ;                           \
+            INS_CHAR(ch, sp, bep, cc);          \
+            width--;                            \
         }                                       \
-        while ( width > len )
+        while (width > len)
 
 /*
  * Prefix the character ch to the string str
  * Increase length
  * Set the has_prefix flag
  */
-#define PREFIX( str, length, ch )        *--str = ch ; length++ ; has_prefix = YES
+#define PREFIX(str, length, ch)        *--str = ch; length++; has_prefix = YES
 
 
 /*
@@ -389,7 +389,7 @@ static char *conv_10_quad(widest_int num, register bool_int is_unsigned,
      * punt to the quicker version.
      */
     if ((num <= ULONG_MAX && is_unsigned) || (num <= LONG_MAX && !is_unsigned))
-        return(conv_10( (wide_int)num, is_unsigned, is_negative,
+        return(conv_10((wide_int)num, is_unsigned, is_negative,
                buf_end, len));
 
     if (is_unsigned) {
@@ -605,7 +605,7 @@ static char *conv_p2_quad(u_widest_int num, register int nbits,
     register const char *digits = (format == 'X') ? upper_digits : low_digits;
 
     if (num <= ULONG_MAX)
-        return(conv_p2( (u_wide_int)num, nbits, format, buf_end, len));
+        return(conv_p2((u_wide_int)num, nbits, format, buf_end, len));
 
     do {
         *--p = digits[num & mask];
diff --git a/native/common/jk_ajp12_worker.c b/native/common/jk_ajp12_worker.c
index d28d48544..38f324a60 100644
--- a/native/common/jk_ajp12_worker.c
+++ b/native/common/jk_ajp12_worker.c
@@ -205,7 +205,8 @@ static int JK_METHOD validate(jk_worker_t *pThis,
                        host, port);
                 return JK_FALSE;
             }
-        } else {
+        }
+        else {
             jk_log(l, JK_LOG_ERROR,
                    "In jk_worker_t::validate, Error no host name given");
             return JK_FALSE;
diff --git a/native/common/jk_ajp14.c b/native/common/jk_ajp14.c
index efd07349a..2d58c0260 100644
--- a/native/common/jk_ajp14.c
+++ b/native/common/jk_ajp14.c
@@ -342,7 +342,7 @@ int ajp14_marshal_unknown_packet_into_msgb(jk_msg_buf_t *msg,
     }
     /*
      * UNHANDLED MESSAGE (Question : Did we have to send all the message or only part of)
-     *                                       (           ie: only 1k max                                                                )
+     *                                       (ie: only 1k max)
      */
     if (jk_b_append_bytes(msg, unk->buf, unk->len)) {
         jk_log(l, JK_LOG_ERROR,
diff --git a/native/common/jk_ajp_common.c b/native/common/jk_ajp_common.c
index 99d437940..ec69f2146 100644
--- a/native/common/jk_ajp_common.c
+++ b/native/common/jk_ajp_common.c
@@ -845,8 +845,8 @@ static void ajp_reset_endpoint(ajp_endpoint_t * ae, jk_logger_t *l)
 
     if (JK_IS_DEBUG_LEVEL(l))
         jk_log(l, JK_LOG_DEBUG,
-        "(%s) resetting endpoint with socket %d%s",
-         ae->worker->name, ae->sd, ae->reuse? "" : " (socket shutdown)");
+               "(%s) resetting endpoint with socket %d%s",
+               ae->worker->name, ae->sd, ae->reuse? "" : " (socket shutdown)");
     if (!ae->reuse) {
         ajp_abort_endpoint(ae, JK_TRUE, l);
     }
@@ -914,8 +914,8 @@ static int ajp_next_connection(ajp_endpoint_t *ae, jk_logger_t *l)
         ret = JK_TRUE;
         if (JK_IS_DEBUG_LEVEL(l))
             jk_log(l, JK_LOG_DEBUG,
-                    "(%s) Will try pooled connection socket %d from slot %d",
-                    ae->worker->name, ae->sd, i);
+                   "(%s) Will try pooled connection socket %d from slot %d",
+                   ae->worker->name, ae->sd, i);
     }
     JK_TRACE_EXIT(l);
     return ret;
@@ -1270,7 +1270,7 @@ int ajp_connection_tcp_send_message(ajp_endpoint_t * ae,
     else {
         jk_log(l, JK_LOG_ERROR,
                "(%s) unknown protocol %d, supported are AJP13/AJP14",
-                ae->worker->name, ae->proto);
+               ae->worker->name, ae->proto);
         /* We've got a protocol error.
          * We can't trust this connection any more,
          * because we might have send already parts of the request.
@@ -1368,7 +1368,7 @@ int ajp_connection_tcp_get_message(ajp_endpoint_t * ae,
                 jk_log(l, JK_LOG_ERROR,
                        "(%s) wrong message format 0x%04x from %s",
                        ae->worker->name, header, jk_dump_hinfo(&ae->worker->worker_inet_addr,
-                                             buf, sizeof(buf)));
+                                                               buf, sizeof(buf)));
             }
             /* We've got a protocol error.
              * We can't trust this connection any more.
@@ -1390,7 +1390,7 @@ int ajp_connection_tcp_get_message(ajp_endpoint_t * ae,
                 jk_log(l, JK_LOG_ERROR,
                        "(%s) wrong message format 0x%04x from %s",
                        ae->worker->name, header, jk_dump_hinfo(&ae->worker->worker_inet_addr,
-                                             buf, sizeof(buf)));
+                                                               buf, sizeof(buf)));
             }
             /* We've got a protocol error.
              * We can't trust this connection any more.
@@ -1536,7 +1536,8 @@ static int ajp_read_into_msg_buff(ajp_endpoint_t * ae,
      */
     if (r->is_chunked && ae->left_bytes_to_send == 0) {
         len = maxlen;
-    } else {
+    }
+    else {
         if ((jk_uint64_t)maxlen > ae->left_bytes_to_send) {
             maxlen = (int)ae->left_bytes_to_send;
         }
@@ -1621,9 +1622,9 @@ static int ajp_send_request(jk_endpoint_t *e,
     if (ae->last_op != JK_AJP13_END_RESPONSE &&
         ae->last_op != AJP13_CPONG_REPLY) {
         jk_log(l, JK_LOG_INFO,
-                "(%s) did not receive END_RESPONSE, "
-                "closing socket %d",
-                ae->worker->name, ae->sd);
+               "(%s) did not receive END_RESPONSE, "
+               "closing socket %d",
+               ae->worker->name, ae->sd);
         ajp_abort_endpoint(ae, JK_TRUE, l);
     }
     /* First try to check open connections...
@@ -1650,7 +1651,7 @@ static int ajp_send_request(jk_endpoint_t *e,
                 jk_log(l, JK_LOG_INFO,
                        "(%s) failed sending request, "
                        "socket %d prepost cping/cpong failure (errno=%d)",
-                        ae->worker->name, ae->sd, ae->last_errno);
+                       ae->worker->name, ae->sd, ae->last_errno);
                 /* XXX: Is there any reason to try other
                  * connections to the node if one of them fails
                  * the cping/cpong heartbeat?
@@ -1683,9 +1684,9 @@ static int ajp_send_request(jk_endpoint_t *e,
             jk_log(l, JK_LOG_INFO,
                    "(%s) failed sending request (%srecoverable) "
                    "(errno=%d)",
-                    ae->worker->name,
-                    op->recoverable ? "" : "un",
-                    ae->last_errno);
+                   ae->worker->name,
+                   op->recoverable ? "" : "un",
+                   ae->last_errno);
             JK_TRACE_EXIT(l);
             return JK_FATAL_ERROR;
         }
@@ -1738,7 +1739,7 @@ static int ajp_send_request(jk_endpoint_t *e,
                 jk_log(l, JK_LOG_INFO,
                        "(%s) failed sending request, "
                        "socket %d prepost cping/cpong failure (errno=%d)",
-                        ae->worker->name, ae->sd, ae->last_errno);
+                       ae->worker->name, ae->sd, ae->last_errno);
                 JK_TRACE_EXIT(l);
                 return JK_FATAL_ERROR;
             }
@@ -1756,8 +1757,8 @@ static int ajp_send_request(jk_endpoint_t *e,
             jk_log(l, JK_LOG_ERROR,
                    "(%s) failed sending request on a fresh connection (%srecoverable), "
                    "socket %d (errno=%d)",
-                    ae->worker->name, op->recoverable ? "" : "un",
-                    ae->sd, ae->last_errno);
+                   ae->worker->name, op->recoverable ? "" : "un",
+                   ae->sd, ae->last_errno);
             JK_TRACE_EXIT(l);
             return JK_FATAL_ERROR;
         }
@@ -1800,8 +1801,8 @@ static int ajp_send_request(jk_endpoint_t *e,
             jk_log(l, JK_LOG_ERROR,
                    "(%s) failed sending request body of size %d "
                    "(%srecoverable), socket %d (errno=%d)",
-                    ae->worker->name, postlen, op->recoverable ? "" : "un",
-                    ae->sd, ae->last_errno);
+                   ae->worker->name, postlen, op->recoverable ? "" : "un",
+                   ae->sd, ae->last_errno);
             JK_TRACE_EXIT(l);
             return JK_FATAL_ERROR;
         }
@@ -1826,8 +1827,8 @@ static int ajp_send_request(jk_endpoint_t *e,
                 jk_log(l, JK_LOG_ERROR,
                        "(%s) failed sending request body of size %d (lb mode) "
                        "(%srecoverable), socket %d (errno=%d)",
-                        ae->worker->name, postlen, op->recoverable ? "" : "un",
-                        ae->sd, ae->last_errno);
+                       ae->worker->name, postlen, op->recoverable ? "" : "un",
+                       ae->sd, ae->last_errno);
                 JK_TRACE_EXIT(l);
                 return JK_FATAL_ERROR;
             }
@@ -1846,7 +1847,7 @@ static int ajp_send_request(jk_endpoint_t *e,
          * doing a read (not yet)
          *
          * || s->is_chunked - this can't be done here. The original protocol
-         * sends the first chunk of post data ( based on Content-Length ),
+         * sends the first chunk of post data (based on Content-Length),
          * and that's what the java side expects.
          * Sending this data for chunked would break other ajp13 servers.
          *
@@ -1858,7 +1859,7 @@ static int ajp_send_request(jk_endpoint_t *e,
                 if (JK_IS_DEBUG_LEVEL(l))
                     jk_log(l, JK_LOG_DEBUG,
                            "(%s) browser stop sending data, no need to recover",
-                            ae->worker->name);
+                           ae->worker->name);
                 op->recoverable = JK_FALSE;
                 /* Send an empty POST message since per AJP protocol
                  * spec whenever we have content length the message
@@ -1881,7 +1882,7 @@ static int ajp_send_request(jk_endpoint_t *e,
             if (JK_IS_DEBUG_LEVEL(l))
                 jk_log(l, JK_LOG_DEBUG,
                        "(%s) sending %d bytes of request body",
-                        ae->worker->name, len);
+                       ae->worker->name, len);
 
             s->content_read = (jk_uint64_t)len;
             rc = ajp_connection_tcp_send_message(ae, op->post, l);
@@ -1893,8 +1894,8 @@ static int ajp_send_request(jk_endpoint_t *e,
                 jk_log(l, JK_LOG_ERROR,
                        "(%s) failed sending request body of size %d "
                        "(%srecoverable), socket %d (errno=%d)",
-                        ae->worker->name, len, op->recoverable ? "" : "un",
-                        ae->sd, ae->last_errno);
+                       ae->worker->name, len, op->recoverable ? "" : "un",
+                       ae->sd, ae->last_errno);
                 JK_TRACE_EXIT(l);
                 return JK_FATAL_ERROR;
             }
@@ -1944,8 +1945,8 @@ static int ajp_process_callback(jk_msg_buf_t *msg,
                 char **old_values = res.header_values;
                 if (JK_IS_DEBUG_LEVEL(l))
                     jk_log(l, JK_LOG_DEBUG, "(%s) Adding %d response headers to %d "
-                    "headers received from tomcat",
-                    ae->worker->name, r->num_resp_headers, res.num_headers);
+                           "headers received from tomcat",
+                           ae->worker->name, r->num_resp_headers, res.num_headers);
                 res.header_names  = jk_pool_alloc(r->pool,
                                                   (r->num_resp_headers + res.num_headers) *
                                                    sizeof(char *));
@@ -1958,7 +1959,8 @@ static int ajp_process_callback(jk_msg_buf_t *msg,
                            ae->worker->name, r->num_resp_headers + res.num_headers);
                     res.header_names = old_names;
                     res.header_values = old_values;
-                } else {
+                }
+                else {
                     if (res.num_headers) {
                         memcpy(res.header_names, old_names, res.num_headers * sizeof(char *));
                         memcpy(res.header_values, old_values, res.num_headers * sizeof(char *));
@@ -2064,15 +2066,15 @@ static int ajp_process_callback(jk_msg_buf_t *msg,
                 }
                 else {
                     jk_log(l, JK_LOG_DEBUG,
-                        "(%s) Ignoring flush message received before headers",
-                        ae->worker->name);
+                           "(%s) Ignoring flush message received before headers",
+                           ae->worker->name);
                 }
             }
             else {
                 if (!r->write(r, msg->buf + msg->pos, len)) {
                     jk_log(l, JK_LOG_INFO,
-                        "(%s) Writing to client aborted or client network problems",
-                        ae->worker->name);
+                           "(%s) Writing to client aborted or client network problems",
+                           ae->worker->name);
                     JK_TRACE_EXIT(l);
                     return JK_CLIENT_WR_ERROR;
                 }
@@ -2325,7 +2327,7 @@ static int ajp_get_reply(jk_endpoint_t *e,
                  */
                 jk_log(l, JK_LOG_ERROR,
                        "(%s) Tomcat already send headers",
-                        p->worker->name);
+                       p->worker->name);
                 op->recoverable = JK_FALSE;
                 JK_TRACE_EXIT(l);
                 return JK_FALSE;
@@ -2356,7 +2358,7 @@ static int ajp_get_reply(jk_endpoint_t *e,
             if (rc != JK_TRUE) {
                 jk_log(l, JK_LOG_ERROR,
                        "(%s) Tomcat is down or network problems",
-                        p->worker->name);
+                       p->worker->name);
                 JK_TRACE_EXIT(l);
                 return JK_FALSE;
             }
@@ -2403,7 +2405,7 @@ static int ajp_get_reply(jk_endpoint_t *e,
             op->recoverable = JK_FALSE;
             jk_log(l, JK_LOG_ERROR,
                    "(%s) Callback returns with unknown value %d",
-                    p->worker->name, rc);
+                   p->worker->name, rc);
             JK_TRACE_EXIT(l);
             return JK_FALSE;
         }
@@ -2576,8 +2578,8 @@ static int JK_METHOD ajp_service(jk_endpoint_t *e,
     if (!ajp_marshal_into_msgb(op->request, s, l, p)) {
         *is_error = JK_HTTP_REQUEST_TOO_LARGE;
         jk_log(l, JK_LOG_INFO,
-                "(%s) Creating AJP message failed "
-                "without recovery - check max_packet_size", aw->name);
+               "(%s) Creating AJP message failed "
+               "without recovery - check max_packet_size", aw->name);
         aw->s->client_errors++;
         JK_TRACE_EXIT(l);
         return JK_CLIENT_ERROR;
@@ -2937,8 +2939,8 @@ static int ajp_create_endpoint_cache(ajp_worker_t *p, int proto, jk_logger_t *l)
         p->ep_cache[i] = (ajp_endpoint_t *)calloc(1, sizeof(ajp_endpoint_t));
         if (!p->ep_cache[i]) {
             jk_log(l, JK_LOG_ERROR,
-                    "(%s) allocating endpoint slot %d (errno=%d)",
-                    p->name, i, errno);
+                   "(%s) allocating endpoint slot %d (errno=%d)",
+                   p->name, i, errno);
             JK_TRACE_EXIT(l);
             return JK_FALSE;
         }
@@ -3119,19 +3121,19 @@ int ajp_init(jk_worker_t *pThis,
 
             jk_log(l, JK_LOG_DEBUG,
                    "retries:                %d",
-                    p->retries);
+                   p->retries);
 
             jk_log(l, JK_LOG_DEBUG,
                    "max packet size:        %d",
-                    p->max_packet_size);
+                   p->max_packet_size);
 
             jk_log(l, JK_LOG_DEBUG,
                    "retry interval:         %d",
-                    p->retry_interval);
+                   p->retry_interval);
 
             jk_log(l, JK_LOG_DEBUG,
                    "busy limit:         %d",
-                    p->busy_limit);
+                   p->busy_limit);
         }
         /*
          *  Need to initialize secret here since we could return from inside
@@ -3285,8 +3287,8 @@ int JK_METHOD ajp_done(jk_endpoint_t **e, jk_logger_t *l)
 
         if (JK_IS_DEBUG_LEVEL(l))
             jk_log(l, JK_LOG_DEBUG,
-                    "recycling connection pool for worker %s and socket %d",
-                    p->worker->name, (int)p->sd);
+                   "recycling connection pool for worker %s and socket %d",
+                   p->worker->name, (int)p->sd);
         JK_TRACE_EXIT(l);
         return JK_TRUE;
     }
@@ -3363,15 +3365,15 @@ int ajp_get_endpoint(jk_worker_t *pThis,
                 retry++;
                 if (JK_IS_DEBUG_LEVEL(l))
                     jk_log(l, JK_LOG_DEBUG,
-                            "could not get free endpoint for worker %s"
-                            " (retry %d, sleeping for %d ms)",
-                            aw->name, retry, JK_SLEEP_DEF);
+                           "could not get free endpoint for worker %s"
+                           " (retry %d, sleeping for %d ms)",
+                           aw->name, retry, JK_SLEEP_DEF);
                 jk_sleep(JK_SLEEP_DEF);
             }
         }
         jk_log(l, JK_LOG_WARNING,
-                "Unable to get the free endpoint for worker %s from %u slots",
-                aw->name, aw->ep_cache_sz);
+               "Unable to get the free endpoint for worker %s from %u slots",
+               aw->name, aw->ep_cache_sz);
     }
     else {
         JK_LOG_NULL_PARAMS(l);
@@ -3438,8 +3440,8 @@ int JK_METHOD ajp_maintain(jk_worker_t *pThis, time_t mstarted, int global, jk_l
                 if (cnt <= aw->ep_mincache_sz + n) {
                     if (JK_IS_DEBUG_LEVEL(l)) {
                         jk_log(l, JK_LOG_DEBUG,
-                        "(%s) reached pool min size %u from %u cache slots",
-                        aw->name, aw->ep_mincache_sz, aw->ep_cache_sz);
+                               "(%s) reached pool min size %u from %u cache slots",
+                               aw->name, aw->ep_mincache_sz, aw->ep_cache_sz);
                     }
                     break;
                 }
diff --git a/native/common/jk_connect.c b/native/common/jk_connect.c
index 2129434d4..f570725b6 100644
--- a/native/common/jk_connect.c
+++ b/native/common/jk_connect.c
@@ -664,7 +664,7 @@ jk_sock_t jk_open_socket(jk_sockaddr_t *addr, jk_sockaddr_t *source,
                    sizeof(set))) {
         JK_GET_SOCKET_ERRNO();
         jk_log(l, JK_LOG_ERROR,
-                "failed setting TCP_NODELAY (errno=%d)", errno);
+               "failed setting TCP_NODELAY (errno=%d)", errno);
         jk_close_socket(sd, l);
         JK_TRACE_EXIT(l);
         return JK_INVALID_SOCKET;
@@ -719,7 +719,7 @@ jk_sock_t jk_open_socket(jk_sockaddr_t *addr, jk_sockaddr_t *source,
                         sizeof(set))) {
             JK_GET_SOCKET_ERRNO();
             jk_log(l, JK_LOG_ERROR,
-                    "failed setting SO_SNDBUF (errno=%d)", errno);
+                   "failed setting SO_SNDBUF (errno=%d)", errno);
             jk_close_socket(sd, l);
             JK_TRACE_EXIT(l);
             return JK_INVALID_SOCKET;
@@ -730,7 +730,7 @@ jk_sock_t jk_open_socket(jk_sockaddr_t *addr, jk_sockaddr_t *source,
                                 sizeof(set))) {
             JK_GET_SOCKET_ERRNO();
             jk_log(l, JK_LOG_ERROR,
-                    "failed setting SO_RCVBUF (errno=%d)", errno);
+                   "failed setting SO_RCVBUF (errno=%d)", errno);
             jk_close_socket(sd, l);
             JK_TRACE_EXIT(l);
             return JK_INVALID_SOCKET;
@@ -773,7 +773,7 @@ jk_sock_t jk_open_socket(jk_sockaddr_t *addr, jk_sockaddr_t *source,
                    sizeof(int))) {
         JK_GET_SOCKET_ERRNO();
         jk_log(l, JK_LOG_ERROR,
-                "failed setting SO_NOSIGPIPE (errno=%d)", errno);
+               "failed setting SO_NOSIGPIPE (errno=%d)", errno);
         jk_close_socket(sd, l);
         JK_TRACE_EXIT(l);
         return JK_INVALID_SOCKET;
@@ -786,7 +786,7 @@ jk_sock_t jk_open_socket(jk_sockaddr_t *addr, jk_sockaddr_t *source,
                    sizeof(li))) {
         JK_GET_SOCKET_ERRNO();
         jk_log(l, JK_LOG_ERROR,
-                "failed setting SO_LINGER (errno=%d)", errno);
+               "failed setting SO_LINGER (errno=%d)", errno);
         jk_close_socket(sd, l);
         JK_TRACE_EXIT(l);
         return JK_INVALID_SOCKET;
@@ -795,8 +795,8 @@ jk_sock_t jk_open_socket(jk_sockaddr_t *addr, jk_sockaddr_t *source,
     /* Tries to connect to Tomcat (continues trying while error is EINTR) */
     if (JK_IS_DEBUG_LEVEL(l))
         jk_log(l, JK_LOG_DEBUG,
-                "trying to connect socket %d to %s", sd,
-                jk_dump_hinfo(addr, buf, sizeof(buf)));
+               "trying to connect socket %d to %s", sd,
+               jk_dump_hinfo(addr, buf, sizeof(buf)));
 
 /* Need more infos for BSD 4.4 and Unix 98 defines, for now only
 iSeries when Unix98 is required at compile time */
@@ -1209,7 +1209,8 @@ static const char *inet_ntop6(const unsigned char *src, char *dst, size_t size)
             else {
                 cur.len++;
             }
-        } else {
+        }
+        else {
             if (cur.base != -1) {
                 if (best.base == -1 || cur.len > best.len) {
                     best = cur;
@@ -1285,7 +1286,8 @@ char *jk_dump_hinfo(jk_sockaddr_t *saddr, char *buf, size_t size)
 
     if (saddr->ipaddr_ptr == NULL) {
         strcpy(buf, "UnresolvedIP");
-    } else {
+    }
+    else {
         if (saddr->family == JK_INET) {
             inet_ntop4(saddr->ipaddr_ptr, buf, size);
         }
diff --git a/native/common/jk_lb_worker.c b/native/common/jk_lb_worker.c
index c2ec16db4..7e003a9cc 100644
--- a/native/common/jk_lb_worker.c
+++ b/native/common/jk_lb_worker.c
@@ -944,7 +944,8 @@ static int find_bysession_route(jk_ws_service_t *s,
     if (candidate < 0) {
         uses_domain = 1;
         candidate = find_best_bydomain(s, p, session_route, states, l);
-    } else {
+    }
+    else {
         s->sticky = JK_TRUE;
     }
     if (candidate >= 0) {
@@ -975,7 +976,8 @@ static int find_bysession_route(jk_ws_service_t *s,
                 candidate = find_best_bydomain(s, p, wr.domain, states, l);
                 if (candidate >= 0) {
                     s->route = wr.domain;
-                } else {
+                }
+                else {
                     s->route = NULL;
                 }
             }
@@ -1281,7 +1283,7 @@ static int JK_METHOD service(jk_endpoint_t *e,
     while (recoverable == JK_TRUE) {
         if (JK_IS_DEBUG_LEVEL(l))
             jk_log(l, JK_LOG_DEBUG, "attempt %d, max attempts %d, worker count %d",
-                    attempt, p->worker->lb_retries, num_of_workers);
+                   attempt, p->worker->lb_retries, num_of_workers);
         if (attempt >= num_of_workers || attempt >= p->worker->lb_retries) {
             retry++;
             if (retry >= p->worker->retries) {
@@ -1388,7 +1390,7 @@ static int JK_METHOD service(jk_endpoint_t *e,
                                                       (s->num_resp_headers + 1) * sizeof(char *));
                     if (!s->resp_headers_names || !s->resp_headers_values) {
                         jk_log(l, JK_LOG_ERROR,
-                            "Failed allocating %d new response headers.", s->num_resp_headers + 1);
+                               "Failed allocating %d new response headers.", s->num_resp_headers + 1);
                         s->resp_headers_names = old_names;
                         s->resp_headers_values = old_values;
                     } else if (s->num_resp_headers) {
diff --git a/native/common/jk_map.c b/native/common/jk_map.c
index 3665595cb..5b378116e 100644
--- a/native/common/jk_map.c
+++ b/native/common/jk_map.c
@@ -787,7 +787,7 @@ int jk_map_resolve_references(jk_map_t *m, const char *prefix,
                 if (v && *v &&
                     !strncmp(m->names[i], prefix, prelen)) {
                     size_t remain = strlen(m->names[i]) - prelen;
-                    if ((remain == JK_MAP_REFERENCE_SZ ) || (wildcard && remain > JK_MAP_REFERENCE_SZ)) {
+                    if ((remain == JK_MAP_REFERENCE_SZ) || (wildcard && remain > JK_MAP_REFERENCE_SZ)) {
                         remain = strlen(m->names[i]) - JK_MAP_REFERENCE_SZ;
                         if (!strncmp(m->names[i] + remain, JK_MAP_REFERENCE, JK_MAP_REFERENCE_SZ)) {
                             char *from = jk_pool_alloc(&m->p,
@@ -868,7 +868,7 @@ int jk_map_inherit_properties(jk_map_t *m, const char *from, const char *to, jk_
                 }
                 strcpy(to_prp, to);
                 strcat(to_prp, prp);
-                if (jk_map_get_id(m, to_prp) < 0 ) {
+                if (jk_map_get_id(m, to_prp) < 0) {
                     rc = jk_map_add(m, to_prp, m->values[i]);
                     if (rc == JK_FALSE) {
                         jk_log(l, JK_LOG_ERROR,
@@ -879,7 +879,7 @@ int jk_map_inherit_properties(jk_map_t *m, const char *from, const char *to, jk_
                 }
             }
         }
-        if ( rc == JK_FALSE) {
+        if (rc == JK_FALSE) {
             jk_log(l, JK_LOG_ERROR,
                    "Reference '%s' not found",
                    from);
diff --git a/native/common/jk_shm.c b/native/common/jk_shm.c
index 58956dc5e..d4281ecfa 100644
--- a/native/common/jk_shm.c
+++ b/native/common/jk_shm.c
@@ -377,10 +377,10 @@ int jk_shm_attach(const char *fname, int sz, jk_logger_t *l)
             jk_shmem.attached = 1;
             if (JK_IS_DEBUG_LEVEL(l)) {
                 jk_log(l, JK_LOG_DEBUG,
-                   "Attached shared memory %s [%d] size=%u free=%u addr=%#lx",
-                   jk_shm_name(), jk_shmem.hdr->h.data.childs, jk_shmem.size,
-                   jk_shmem.hdr->h.data.size - jk_shmem.hdr->h.data.pos,
-                   jk_shmem.hdr);
+                       "Attached shared memory %s [%d] size=%u free=%u addr=%#lx",
+                       jk_shm_name(), jk_shmem.hdr->h.data.childs, jk_shmem.size,
+                       jk_shmem.hdr->h.data.size - jk_shmem.hdr->h.data.pos,
+                       jk_shmem.hdr);
             }
         }
         JK_TRACE_EXIT(l);
diff --git a/native/common/jk_status.c b/native/common/jk_status.c
index 0ee9bbe5a..7230726ff 100644
--- a/native/common/jk_status.c
+++ b/native/common/jk_status.c
@@ -787,7 +787,8 @@ static const char *windows_strftime_preprocess(const char *pattern,
                      (tz.Bias >= 0 ? '+' : '-'), tz.Bias / 60, tz.Bias % 60);
         }
         return buf;
-    } else {
+    }
+    else {
         return pattern;
     }
 }
@@ -2057,7 +2058,7 @@ static void display_worker_ajp_details(jk_ws_service_t *s,
             jk_print_xml_att_int(s, l, off+2, "map_count", map_count);
         jk_print_xml_att_long(s, l, off+2, "last_reset_at", (long)aw->s->last_reset);
         jk_print_xml_att_int(s, l, off+2, "last_reset_ago", delta_reset);
-        if (rc_time > 0 ) {
+        if (rc_time > 0) {
             jk_print_xml_att_string(s, l, off+2, "error_time_datetime", buf_time);
             jk_print_xml_att_string(s, l, off+2, "error_time_tz", buf_tz);
             jk_print_xml_att_int(s, l, off+2, "error_time_unix_seconds", (int)error_time);
@@ -2264,9 +2265,9 @@ static void display_worker_lb(jk_ws_service_t *s,
         lb_sub_worker_t *wr = &(lb->lb_workers[j]);
         int rate;
         rate = status_rate(wr, w, l);
-        if (rate > 0 )
+        if (rate > 0)
            good++;
-        else if (rate < 0 )
+        else if (rate < 0)
            bad++;
         else
            degraded++;
@@ -3458,11 +3459,11 @@ static int commit_member(jk_ws_service_t *s,
                 snprintf(p->msg, size, msg, arg, aw->name);
                 rc = JK_FALSE;
             }
-            else if (strncmp(wr->route, arg, JK_SHM_STR_SIZ )) {
+            else if (strncmp(wr->route, arg, JK_SHM_STR_SIZ)) {
                 jk_log(l, JK_LOG_INFO,
                        "Status worker '%s' changing 'route' for sub worker '%s' of lb worker '%s' from '%s' to '%s'",
                        w->name, wr->name, lb_name, wr->route, arg);
-                strncpy(wr->route, arg, JK_SHM_STR_SIZ );
+                strncpy(wr->route, arg, JK_SHM_STR_SIZ);
                 *side_effect |= JK_STATUS_NEEDS_PUSH;
                 if (!wr->domain[0]) {
                     char * id_domain = strchr(wr->route, '.');
@@ -3484,11 +3485,11 @@ static int commit_member(jk_ws_service_t *s,
                 snprintf(p->msg, size, msg, arg, aw->name);
                 rc = JK_FALSE;
             }
-            else if (strncmp(wr->redirect, arg, JK_SHM_STR_SIZ )) {
+            else if (strncmp(wr->redirect, arg, JK_SHM_STR_SIZ)) {
                 jk_log(l, JK_LOG_INFO,
                        "Status worker '%s' changing 'redirect' for sub worker '%s' of lb worker '%s' from '%s' to '%s'",
                        w->name, wr->name, lb_name, wr->redirect, arg);
-                strncpy(wr->redirect, arg, JK_SHM_STR_SIZ );
+                strncpy(wr->redirect, arg, JK_SHM_STR_SIZ);
                 *side_effect |= JK_STATUS_NEEDS_PUSH;
             }
         }
@@ -3502,7 +3503,7 @@ static int commit_member(jk_ws_service_t *s,
                 snprintf(p->msg, size, msg, arg, aw->name);
                 rc = JK_FALSE;
             }
-            else if (strncmp(wr->domain, arg, JK_SHM_STR_SIZ )) {
+            else if (strncmp(wr->domain, arg, JK_SHM_STR_SIZ)) {
                 jk_log(l, JK_LOG_INFO,
                        "Status worker '%s' changing 'domain' for sub worker '%s' of lb worker '%s' from '%s' to '%s'",
                        w->name, wr->name, lb_name, wr->domain, arg);
@@ -3545,8 +3546,8 @@ static int commit_member(jk_ws_service_t *s,
         }
         else if (strncmp(aw->host, arg, JK_SHM_STR_SIZ)) {
             jk_log(l, JK_LOG_INFO,
-                    "Status worker '%s' changing 'host' for sub worker '%s' from '%s' to '%s'",
-                    w->name, aw->name, aw->host, arg);
+                   "Status worker '%s' changing 'host' for sub worker '%s' from '%s' to '%s'",
+                   w->name, aw->name, aw->host, arg);
             strncpy(host, arg, JK_SHM_STR_SIZ);
             resolve = JK_TRUE;
         }
@@ -4375,8 +4376,8 @@ static int update_worker(jk_ws_service_t *s,
                 }
                 if (JK_IS_DEBUG_LEVEL(l))
                     jk_log(l, JK_LOG_DEBUG,
-                       "Status worker '%s' %s lb worker '%s' sub worker '%s'",
-                       w->name, "updating", lb->name, wr->name);
+                           "Status worker '%s' %s lb worker '%s' sub worker '%s'",
+                           w->name, "updating", lb->name, wr->name);
                 aw = (ajp_worker_t *)wr->worker->worker_private;
                 rv = 0;
                 rc = commit_member(s, p, lb, wr, aw, &rv, l);
@@ -4925,7 +4926,7 @@ static int JK_METHOD service(jk_endpoint_t *e,
                 jk_print_xml_att_int(s, l, 2, "port", s->server_port);
                 jk_print_xml_stop_elt(s, l, 0, 1);
                 if (cmd_props & JK_STATUS_CMD_PROP_HEAD) {
-                    if (rc_time > 0 ) {
+                    if (rc_time > 0) {
                         jk_print_xml_start_elt(s, l, w, 0, 0, "time");
                         jk_print_xml_att_string(s, l, 2, "datetime", buf_time);
                         jk_print_xml_att_string(s, l, 2, "tz", buf_tz);
@@ -5317,9 +5318,9 @@ static int JK_METHOD init(jk_worker_t *pThis,
             for (i = 0; i < p->num_of_users; i++) {
                 if (JK_IS_DEBUG_LEVEL(l))
                     jk_log(l, JK_LOG_DEBUG,
-                            "Status worker '%s' restricting access to user '%s' case %s",
-                            p->name, p->user_names[i],
-                            p->user_case_insensitive ? "insensitive" : "sensitive");
+                           "Status worker '%s' restricting access to user '%s' case %s",
+                           p->name, p->user_names[i],
+                           p->user_case_insensitive ? "insensitive" : "sensitive");
             }
         }
         if (jk_get_worker_good_rating(props, p->name,
@@ -5329,8 +5330,8 @@ static int JK_METHOD init(jk_worker_t *pThis,
             for (i = 0; i < num_of_good; i++) {
                 if (JK_IS_DEBUG_LEVEL(l))
                     jk_log(l, JK_LOG_DEBUG,
-                            "Status worker '%s' rating as good: '%s'",
-                            p->name, good_rating[i]);
+                           "Status worker '%s' rating as good: '%s'",
+                           p->name, good_rating[i]);
                 p->good_mask |= status_get_rating(good_rating[i], l);
             }
         }
@@ -5344,8 +5345,8 @@ static int JK_METHOD init(jk_worker_t *pThis,
             for (i = 0; i < num_of_bad; i++) {
                 if (JK_IS_DEBUG_LEVEL(l))
                     jk_log(l, JK_LOG_DEBUG,
-                            "Status worker '%s' rating as bad: '%s'",
-                            p->name, bad_rating[i]);
+                           "Status worker '%s' rating as bad: '%s'",
+                           p->name, bad_rating[i]);
                 p->bad_mask |= status_get_rating(bad_rating[i], l);
             }
         }
diff --git a/native/common/jk_uri_worker_map.c b/native/common/jk_uri_worker_map.c
index c96add29d..f254a21ae 100644
--- a/native/common/jk_uri_worker_map.c
+++ b/native/common/jk_uri_worker_map.c
@@ -162,7 +162,7 @@ static void worker_qsort(jk_uri_worker_map_t *uw_map)
 
    /* Sort remaining args using Quicksort algorithm: */
    qsort((void *)IND_NEXT(uw_map->maps), IND_NEXT(uw_map->size),
-         sizeof(uri_worker_record_t *), worker_compare );
+         sizeof(uri_worker_record_t *), worker_compare);
 
 }
 
@@ -175,7 +175,7 @@ static void uri_worker_map_dump(jk_uri_worker_map_t *uw_map,
         int i, off;
         if (JK_IS_DEBUG_LEVEL(l)) {
             jk_log(l, JK_LOG_DEBUG, "uri map dump %s: id=%d, index=%d file='%s' reject_unsafe=%d "
-                  "reload=%d modified=%d checked=%d",
+                   "reload=%d modified=%d checked=%d",
                    reason, uw_map->id, uw_map->index, STRNULL_FOR_NULL(uw_map->fname),
                    uw_map->reject_unsafe, uw_map->reload, uw_map->modified, uw_map->checked);
         }
@@ -547,27 +547,27 @@ static void extension_fix_session(jk_pool_t *p, const char *name, jk_worker_t *j
 {
     if (jw->type != JK_LB_WORKER_TYPE && extensions->session_cookie) {
         jk_log(l, JK_LOG_WARNING,
-                "Worker %s is not of type lb, extension "
-                JK_UWMAP_EXTENSION_SESSION_COOKIE " for %s ignored",
-                name, extensions->session_cookie);
+               "Worker %s is not of type lb, extension "
+               JK_UWMAP_EXTENSION_SESSION_COOKIE " for %s ignored",
+               name, extensions->session_cookie);
     }
     if (jw->type != JK_LB_WORKER_TYPE && extensions->session_path) {
         jk_log(l, JK_LOG_WARNING,
-                "Worker %s is not of type lb, extension "
-                JK_UWMAP_EXTENSION_SESSION_PATH " for %s ignored",
-                name, extensions->session_path);
+               "Worker %s is not of type lb, extension "
+               JK_UWMAP_EXTENSION_SESSION_PATH " for %s ignored",
+               name, extensions->session_path);
     }
     if (jw->type != JK_LB_WORKER_TYPE && extensions->set_session_cookie) {
         jk_log(l, JK_LOG_WARNING,
-                "Worker %s is not of type lb, extension "
-                JK_UWMAP_EXTENSION_SET_SESSION_COOKIE " for %s ignored",
-                name, extensions->set_session_cookie ? "'true'" : "'false'");
+               "Worker %s is not of type lb, extension "
+               JK_UWMAP_EXTENSION_SET_SESSION_COOKIE " for %s ignored",
+               name, extensions->set_session_cookie ? "'true'" : "'false'");
     }
     if (jw->type != JK_LB_WORKER_TYPE && extensions->session_cookie_path) {
         jk_log(l, JK_LOG_WARNING,
-                "Worker %s is not of type lb, extension "
-                JK_UWMAP_EXTENSION_SESSION_COOKIE_PATH " for %s ignored",
-                name, extensions->session_cookie_path);
+               "Worker %s is not of type lb, extension "
+               JK_UWMAP_EXTENSION_SESSION_COOKIE_PATH " for %s ignored",
+               name, extensions->session_cookie_path);
     }
 }
 
@@ -917,7 +917,7 @@ int uri_worker_map_open(jk_uri_worker_map_t *uw_map,
                     /* Add first mapping */
                     if (!uri_worker_map_add(uw_map, r, w, SOURCE_TYPE_JKMOUNT, l)) {
                         jk_log(l, JK_LOG_ERROR,
-                        "invalid mapping rule %s->%s", r, w);
+                               "invalid mapping rule %s->%s", r, w);
                         rc = JK_FALSE;
                     }
                     for (; *s; s++)
@@ -981,11 +981,11 @@ static int find_match(jk_uri_worker_map_t *uw_map,
             /* Map is already sorted by context_len */
             if (jk_wildchar_match(url, uwr->context,
 #ifdef WIN32
-                               0
+                                  0
 #else
-                               0
+                                  0
 #endif
-                               ) == 0) {
+                                   ) == 0) {
                     if (JK_IS_DEBUG_LEVEL(l))
                         jk_log(l, JK_LOG_DEBUG,
                                "Found a wildchar match '%s=%s'",
@@ -1034,11 +1034,11 @@ static int is_nomatch(jk_uri_worker_map_t *uw_map,
             /* Map is already sorted by context_len */
             if (jk_wildchar_match(uri, uwr->context,
 #ifdef WIN32
-                               0
+                                  0
 #else
-                               0
+                                  0
 #endif
-                               ) == 0) {
+                                   ) == 0) {
                     if (JK_IS_DEBUG_LEVEL(l))
                         jk_log(l, JK_LOG_DEBUG,
                                "Found a wildchar no match '%s=%s' source '%s'",
@@ -1093,7 +1093,8 @@ const char *map_uri_to_worker_ext(jk_uri_worker_map_t *uw_map,
                 jk_log(l, JK_LOG_DEBUG,
                        "Uri %s can't be mapped.", uri);
             }
-        } else {
+        }
+        else {
             jk_log(l, JK_LOG_WARNING,
                    "Uri %s is invalid. Uri must start with /", uri);
         }
@@ -1244,7 +1245,7 @@ int uri_worker_map_load(jk_uri_worker_map_t *uw_map,
                 /* Add first mapping */
                 if (!uri_worker_map_add(uw_map, r, w, SOURCE_TYPE_URIMAP, l)) {
                     jk_log(l, JK_LOG_ERROR,
-                    "invalid mapping rule %s->%s", r, w);
+                           "invalid mapping rule %s->%s", r, w);
                 }
                 for (; *s; s++)
                    *(s - 1) = *s;
@@ -1252,7 +1253,7 @@ int uri_worker_map_load(jk_uri_worker_map_t *uw_map,
                 /* add second mapping */
                 if (!uri_worker_map_add(uw_map, r, w, SOURCE_TYPE_URIMAP, l)) {
                     jk_log(l, JK_LOG_ERROR,
-                    "invalid mapping rule %s->%s", r, w);
+                           "invalid mapping rule %s->%s", r, w);
                 }
                 free(r);
             }
@@ -1266,7 +1267,8 @@ int uri_worker_map_load(jk_uri_worker_map_t *uw_map,
         if (JK_IS_DEBUG_LEVEL(l))
             uri_worker_map_dump(uw_map, "after file load", l);
         rc = JK_TRUE;
-    } else {
+    }
+    else {
         jk_log(l, JK_LOG_ERROR, "Failed to load uri_worker_map file %s (errno=%d, err=%s).", uw_map->fname, errno, strerror(errno));
     }
     jk_map_free(&map);
diff --git a/native/common/jk_util.c b/native/common/jk_util.c
index 7149fc68a..3777e2acc 100644
--- a/native/common/jk_util.c
+++ b/native/common/jk_util.c
@@ -510,7 +510,7 @@ static int set_time_str(char *str, int len, jk_logger_t *l)
     log_fmt[0] = '\0';
 
 #ifndef NO_GETTIMEOFDAY
-    if ( l->log_fmt_type != JK_TIME_SUBSEC_NONE ) {
+    if (l->log_fmt_type != JK_TIME_SUBSEC_NONE) {
         struct timeval tv;
         int rc = 0;
 
@@ -734,7 +734,7 @@ int jk_log(jk_logger_t *l,
             rc = snprintf(buf + used, usable_size - used,
                           "[%" JK_PID_T_FMT ":%" JK_PTHREAD_T_FMT "] ", getpid(), jk_gettid());
             used += rc;
-            if (rc < 0 ) {
+            if (rc < 0) {
                 strcpy(buf, "Logging failed in pid/tid formatting");
                 l->log(l, level, (int)strlen(buf), buf);
                 return 0;
@@ -2253,9 +2253,9 @@ int jk_servlet_normalize(char *path, jk_logger_t *logger)
             // Wind w back to remove the previous segment
             if (w == 1) {
                 jk_log(logger,
-                        JK_LOG_EMERG,
-                        "[%s] contains a '/../' sequence that tries to escape above the root.",
-                        path);
+                       JK_LOG_EMERG,
+                       "[%s] contains a '/../' sequence that tries to escape above the root.",
+                       path);
                 return JK_NORMALIZE_TRAVERSAL;
             }
             do {
@@ -2291,7 +2291,7 @@ int jk_strip_session_id(char* path, char* session_name, jk_logger_t *logger) {
         int j;
         if (JK_IS_DEBUG_LEVEL(logger)) {
             jk_log(logger, JK_LOG_DEBUG,
-                    "removing session identifier for non servlet uri [%s]", path);
+                   "removing session identifier for non servlet uri [%s]", path);
         }
         // Found a session path parameter.
         // Need to skip at least as many characters as there are in
@@ -2311,7 +2311,7 @@ int jk_strip_session_id(char* path, char* session_name, jk_logger_t *logger) {
 
         if (JK_IS_DEBUG_LEVEL(logger)) {
             jk_log(logger, JK_LOG_DEBUG,
-                    "result of removing session identifier for non servlet uri is [%s]", path);
+                   "result of removing session identifier for non servlet uri is [%s]", path);
         }
         return 1;
     }
diff --git a/native/common/jk_worker.c b/native/common/jk_worker.c
index 8790168ce..48f76b1a9 100644
--- a/native/common/jk_worker.c
+++ b/native/common/jk_worker.c
@@ -60,8 +60,8 @@ int wc_open(jk_map_t *init_data, jk_worker_env_t *we, jk_logger_t *l)
     JK_INIT_CS(&worker_lock, rc);
     if (rc == JK_FALSE) {
         jk_log(l, JK_LOG_ERROR,
-                "creating thread lock (errno=%d)",
-                errno);
+               "creating thread lock (errno=%d)",
+               errno);
         JK_TRACE_EXIT(l);
         return JK_FALSE;
     }
@@ -187,8 +187,8 @@ int wc_create_worker(const char *name, int use_map,
             for (i = 0; i < num_of_maps; i++) {
                 if (JK_IS_DEBUG_LEVEL(l))
                     jk_log(l, JK_LOG_DEBUG,
-                            "mounting %s to worker %s",
-                            map_names[i], name);
+                           "mounting %s to worker %s",
+                           map_names[i], name);
                 if (uri_worker_map_add(we->uri_to_worker, map_names[i],
                                        name, SOURCE_TYPE_WORKERDEF, l) == JK_FALSE) {
                     w->destroy(&w, l);
diff --git a/native/iis/jk_isapi_plugin.c b/native/iis/jk_isapi_plugin.c
index b071f3218..303febd7f 100644
--- a/native/iis/jk_isapi_plugin.c
+++ b/native/iis/jk_isapi_plugin.c
@@ -466,7 +466,8 @@ static struct error_reasons {
                                errno == ERANGE)) {          \
             (place) = def;                                  \
         }                                                   \
-    } else {                                                \
+    }                                                       \
+    else {                                                  \
         (place) = def;                                      \
   } } while(0)
 
@@ -557,7 +558,7 @@ static int JK_METHOD start_response(jk_ws_service_t *s,
                                     unsigned int num_of_headers);
 
 static int JK_METHOD iis_read(jk_ws_service_t *s,
-                          void *b, unsigned int l, unsigned int *a);
+                              void *b, unsigned int l, unsigned int *a);
 
 static int JK_METHOD iis_write(jk_ws_service_t *s, const void *b, unsigned int l);
 
@@ -570,7 +571,7 @@ static int init_jk(char *serverName);
 
 
 static int JK_METHOD iis_log_to_file(jk_logger_t *l, int level,
-                                    int used, char *what);
+                                     int used, char *what);
 
 static BOOL initialize_extension(void);
 
@@ -975,7 +976,7 @@ static int JK_METHOD start_response(jk_ws_service_t *s,
             p->chunk_content = JK_FALSE;
             /* Keep alive is still possible */
             if (JK_IS_DEBUG_LEVEL(logger))
-                jk_log(logger, JK_LOG_DEBUG, "Response status %d implies no message body", status );
+                jk_log(logger, JK_LOG_DEBUG, "Response status %d implies no message body", status);
         }
         if (p->chunk_content) {
             for (i = 0; i < num_of_headers; i++) {
@@ -990,14 +991,14 @@ static int JK_METHOD start_response(jk_ws_service_t *s,
                 if (!strcasecmp(CONTENT_LENGTH_HEADER_NAME, header_names[i])) {
                     p->chunk_content = JK_FALSE;
                     if (JK_IS_DEBUG_LEVEL(logger))
-                        jk_log(logger, JK_LOG_DEBUG, "Response specifies Content-Length" );
+                        jk_log(logger, JK_LOG_DEBUG, "Response specifies Content-Length");
                 }
                 else if (!strcasecmp(CONNECTION_HEADER_NAME, header_names[i])
                         && !strcasecmp(CONNECTION_CLOSE_VALUE, header_values[i])) {
                     keep_alive = FALSE;
                     p->chunk_content = JK_FALSE;
                     if (JK_IS_DEBUG_LEVEL(logger))
-                        jk_log(logger, JK_LOG_DEBUG, "Response specifies Connection: Close" );
+                        jk_log(logger, JK_LOG_DEBUG, "Response specifies Connection: Close");
                 }
                 else if (!strcasecmp(TRANSFER_ENCODING_HEADER_NAME, header_names[i])
                         && !strcasecmp(TRANSFER_ENCODING_IDENTITY_VALUE, header_values[i])) {
@@ -1005,7 +1006,7 @@ static int JK_METHOD start_response(jk_ws_service_t *s,
                         * 'identity' is the same as absence of the header */
                     p->chunk_content = JK_FALSE;
                     if (JK_IS_DEBUG_LEVEL(logger))
-                        jk_log(logger, JK_LOG_DEBUG, "Response specifies Transfer-Encoding" );
+                        jk_log(logger, JK_LOG_DEBUG, "Response specifies Transfer-Encoding");
                 }
             }
 
@@ -1290,7 +1291,7 @@ static int JK_METHOD iis_write(jk_ws_service_t *s, const void *b, unsigned int l
             /* Write chunk header */
             if (JK_IS_DEBUG_LEVEL(logger))
                 jk_log(logger, JK_LOG_DEBUG,
-                "Using chunked encoding - writing chunk header for %d byte chunk", l);
+                       "Using chunked encoding - writing chunk header for %d byte chunk", l);
 
             if (!isapi_write_client(p, chunk_header, lstrlenA(chunk_header))) {
                 jk_log(logger, JK_LOG_ERROR, "WriteClient for chunk header failed");
@@ -1752,7 +1753,7 @@ static DWORD handle_notify_event(PHTTP_FILTER_CONTEXT pfc,
     }
 
     /* Duplicate unparsed uri */
-	uri_undec = jk_pool_strdup(&pool, uri);
+    uri_undec = jk_pool_strdup(&pool, uri);
 
     rc = unescape_url(uri);
     if (rc == BAD_REQUEST) {
@@ -1803,8 +1804,8 @@ static DWORD handle_notify_event(PHTTP_FILTER_CONTEXT pfc,
         /* This is a servlet, should redirect ... */
         if (JK_IS_DEBUG_LEVEL(logger))
             jk_log(logger, JK_LOG_DEBUG,
-                "[%s] is a servlet url - should redirect to %s",
-                uri, worker);
+                   "[%s] is a servlet url - should redirect to %s",
+                   uri, worker);
 
         /* get URI we should forward */
         if (uri_select_option == URI_SELECT_OPT_UNPARSED) {
@@ -1930,9 +1931,9 @@ static DWORD handle_notify_event(PHTTP_FILTER_CONTEXT pfc,
         if (JK_IS_DEBUG_LEVEL(logger))
             jk_log(logger, JK_LOG_DEBUG, "[%s] is not a servlet url", uri_undec);
         if (strip_session) {
-        	if (jk_strip_session_id(uri_undec, JK_PATH_SESSION_IDENTIFIER, logger)) {
-        		pfp->SetHeader(pfc, "url", uri_undec);
-        	}
+            if (jk_strip_session_id(uri_undec, JK_PATH_SESSION_IDENTIFIER, logger)) {
+                pfp->SetHeader(pfc, "url", uri_undec);
+            }
         }
     }
 cleanup:
@@ -2131,15 +2132,15 @@ DWORD WINAPI HttpExtensionProc(LPEXTENSION_CONTROL_BLOCK lpEcb)
         else {
             int is_error = JK_HTTP_SERVER_BUSY;
             jk_log(logger, JK_LOG_ERROR,
-                "Failed to obtain an endpoint to service request - "
-                "your connection_pool_size is probably less than the threads in your web server!");
+                   "Failed to obtain an endpoint to service request - "
+                   "your connection_pool_size is probably less than the threads in your web server!");
             lpEcb->dwHttpStatusCode = is_error;
             write_error_message(lpEcb, is_error, private_data.err_hdrs);
         }
     }
     else {
         jk_log(logger, JK_LOG_ERROR,
-            "failed to init service for request.");
+               "failed to init service for request.");
     }
     jk_close_pool(&private_data.p);
     JK_TRACE_EXIT(logger);
@@ -2383,7 +2384,7 @@ static int init_logger(int rotate)
 
     /* Close the current log file if required, and the effective log file name has changed */
     if (log_open && strncmp(log_file_name, log_file_effective, strlen(log_file_name)) != 0) {
-        FILE* lf = ((jk_file_logger_t* )logger->logger_private)->logfile;
+        FILE* lf = ((jk_file_logger_t*)logger->logger_private)->logfile;
         fprintf(lf, "Log rotated to %s\n", log_file_name);
         fflush(lf);
         org = logger;
@@ -2445,7 +2446,7 @@ static int JK_METHOD rotate_log_file(void)
  * Log messages to the log file, rotating the log when required.
  */
 static int JK_METHOD iis_log_to_file(jk_logger_t *l, int level,
-                                    int used, char *what)
+                                     int used, char *what)
 {
     int rc = JK_FALSE;
 
@@ -2535,13 +2536,13 @@ static int init_jk(char *serverName)
         jk_log(logger, JK_LOG_DEBUG, "Using worker index %s.", WORKER_HEADER_INDEX);
         jk_log(logger, JK_LOG_DEBUG, "Using translate header %s.", TOMCAT_TRANSLATE_HEADER_NAME);
         jk_log(logger, JK_LOG_DEBUG, "Using a default of %d connections per pool.",
-                                     DEFAULT_WORKER_THREADS);
+               DEFAULT_WORKER_THREADS);
     }
 
     if ((log_rotationtime > 0) && (log_filesize > 0)) {
         jk_log(logger, JK_LOG_WARNING,
-            "%s is defined in configuration, but will be ignored because %s is set. ",
-            LOG_FILESIZE_TAG, LOG_ROTATION_TIME_TAG);
+               "%s is defined in configuration, but will be ignored because %s is set. ",
+               LOG_FILESIZE_TAG, LOG_ROTATION_TIME_TAG);
     }
 
     if (rewrite_rule_file[0] && jk_map_alloc(&rewrite_map)) {
@@ -2829,7 +2830,7 @@ static int read_registry_init_data(void)
     }
     if (get_config_parameter(src, COLLAPSE_SLASHES_TAG, tmpbuf, sizeof(tmpbuf))) {
         jk_log(logger, JK_LOG_ERROR, "Configuration item '" COLLAPSE_SLASHES_TAG
-                "' is deprecated and will be ignored");
+               "' is deprecated and will be ignored");
     }
     shm_config_size = get_config_int(src, SHM_SIZE_TAG, -1);
     worker_mount_reload = get_config_int(src, WORKER_MOUNT_RELOAD_TAG, JK_URIMAP_DEF_RELOAD);
@@ -2882,7 +2883,7 @@ static int get_config_int(LPVOID src, const char *tag, int def)
     }
     else {
         int val;
-        if (get_registry_config_number(src, tag, &val) ) {
+        if (get_registry_config_number(src, tag, &val)) {
             return val;
         }
         else {
@@ -2965,7 +2966,7 @@ static int init_ws_service(isapi_private_data_t * private_data,
 
     if (s->req_uri == NULL) {
         if (JK_IS_DEBUG_LEVEL(logger))
-            jk_log(logger, JK_LOG_DEBUG, "No URI header value provided. Defaulting to old behaviour" );
+            jk_log(logger, JK_LOG_DEBUG, "No URI header value provided. Defaulting to old behaviour");
         s->query_string = private_data->lpEcb->lpszQueryString;
         *worker_name = DEFAULT_WORKER_NAME;
         GET_SERVER_VARIABLE_VALUE("URL", s->req_uri, "");
@@ -2974,7 +2975,8 @@ static int init_ws_service(isapi_private_data_t * private_data,
             return JK_FALSE;
         }
         jk_servlet_normalize(s->req_uri, logger);
-    } else {
+    }
+    else {
         GET_SERVER_VARIABLE_VALUE(HTTP_QUERY_HEADER_NAME, s->query_string, "");
         GET_SERVER_VARIABLE_VALUE(HTTP_WORKER_HEADER_NAME, (*worker_name), "");
         GET_SERVER_VARIABLE_VALUE_INT(HTTP_WORKER_HEADER_INDEX, worker_index, -1);
@@ -3032,7 +3034,7 @@ static int init_ws_service(isapi_private_data_t * private_data,
     e = get_uri_to_worker_ext(uw_map, worker_index);
     if (e) {
         if (JK_IS_DEBUG_LEVEL(logger))
-            jk_log(logger, JK_LOG_DEBUG, "Applying service extensions" );
+            jk_log(logger, JK_LOG_DEBUG, "Applying service extensions");
         s->extension.reply_timeout = e->reply_timeout;
         s->extension.sticky_ignore = e->sticky_ignore;
         s->extension.stateless = e->stateless;
@@ -3140,7 +3142,7 @@ static int init_ws_service(isapi_private_data_t * private_data,
                            cc.CertContext.cbCertEncoded,
                            cc.dwCertificateFlags);
                     s->ssl_cert = jk_pool_alloc(&private_data->p,
-                                      base64_encode_cert_len(cc.CertContext.cbCertEncoded));
+                                                base64_encode_cert_len(cc.CertContext.cbCertEncoded));
                     s->ssl_cert_len = base64_encode_cert(s->ssl_cert, cb,
                                                          cc.CertContext.cbCertEncoded) - 1;
                 }
@@ -3623,7 +3625,7 @@ static char *path_merge(const char *root, const char *path)
     int remain = 0;
 
     if (root == NULL || path == NULL) {
-        SetLastError(ERROR_INVALID_PARAMETER );
+        SetLastError(ERROR_INVALID_PARAMETER);
         return 0;
     }
     if (FAILED(StringCbCopy(dir, MAX_PATH, root))) {


---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscribe@tomcat.apache.org
For additional commands, e-mail: dev-help@tomcat.apache.org