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
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
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));
}
}
static void *ap_buffered_log_writer_init(apr_pool_t *p, server_rec *s,
const char* name);
-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_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 */
apr_hash_set(log_hash, tag, 1, (const void *)log_struct);
}
-static ap_log_writer_init* ap_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;
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) {
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]);
{
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;
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;