Add a few AP_DEBUG_ASSERT()s for the benefit of clang
style tweak
No need to clear memory that is fully initialized just the line after.
Avoid unnecessary %s substitution
Avoid processing some files twice if APR_INCLUDEDIR and
APU_INCLUDEDIR containin the same path but differing in
doubled slashes.
Fixed position of the NEED_ENHANCED_ESCAPES define.
This define should be outside of the else case so that it
gets also defined if we cross-compile for Win32 or OS2.
Submitted by: sf, trawick, jailletc36, jailletc36, sf, fuankg
Reviewed/backported by: jim
git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/branches/2.4.x@
1439391 13f79535-47bb-0310-9956-
ffa450edef68
2.4.x patch: trunk patch works
+1: kbrand, jorton, jerenkrantz
- * add new ap_bin2hex() utility function.
- This is needed to incorporate other changes that make use of this new function.
- trunk patch: http://svn.apache.org/viewvc?view=revision&revision=1422549
- http://svn.apache.org/viewvc?view=revision&revision=1422712
- 2.4.x patch: trunk patches works (modulo an offset for httpd.h and minor MMN dump)
- +1: jailletc36, rjung, humbedooh
-
- * various small things to keep 2.4.x in line with trunk
- 1384913: Add a few AP_DEBUG_ASSERT()s for the benefit of clang
- 1399687: style tweak
- 1419719: No need to clear memory that is fully initialized just the line after.
- 1419755: Avoid unnecessary %s substitution
- 1416278: Avoid processing some files twice if APR_INCLUDEDIR and
- APU_INCLUDEDIR containin the same path but differing in
- doubled slashes.
- 1330189: Fixed position of the NEED_ENHANCED_ESCAPES define.
- trunk patches:
- http://svn.apache.org/viewvc?view=revision&revision=1384913
- http://svn.apache.org/viewvc?view=revision&revision=1399687
- http://svn.apache.org/viewvc?view=revision&revision=1419719
- http://svn.apache.org/viewvc?view=revision&revision=1419755
- http://svn.apache.org/viewvc?view=revision&revision=1416278
- http://svn.apache.org/viewvc?view=revision&revision=1330189
- 2.4.x patch: http://people.apache.org/~jailletc36/backport4.patch
- +1: jailletc36, rjung, covener
-
* Speed-up 'ap_fputs'. This change is just the inline version of what is remaining
in apr_brigade_puts() after http://svn.apache.org/viewvc?view=revision&revision=1402870
trunk patch: http://svn.apache.org/viewvc?view=revision&revision=1409437
ap_remove_output_filter(f);
return ap_pass_brigade(f->next, bb);
}
+ AP_DEBUG_ASSERT(ctx->func != NULL);
}
/* call the content filter with its own context, then restore our
* Date and Server are less interesting, use TRACE5 for them while
* using TRACE4 for the other headers.
*/
- ap_log_rerror(APLOG_MARK, APLOG_TRACE5, 0, r, " %s: %s", "Date",
+ ap_log_rerror(APLOG_MARK, APLOG_TRACE5, 0, r, " Date: %s",
proxy_date ? proxy_date : date );
if (server)
- ap_log_rerror(APLOG_MARK, APLOG_TRACE5, 0, r, " %s: %s", "Server",
+ ap_log_rerror(APLOG_MARK, APLOG_TRACE5, 0, r, " Server: %s",
server);
}
int sgindex;
char **group;
res = apr_pcalloc(r->pool, sizeof(util_compare_subgroup_t));
- res->subgroupDNs = apr_pcalloc(r->pool,
- sizeof(char *) * (subgroups->nelts));
+ res->subgroupDNs = apr_palloc(r->pool,
+ sizeof(char *) * (subgroups->nelts));
for (sgindex = 0; (group = apr_array_pop(subgroups)); sgindex++) {
res->subgroupDNs[sgindex] = apr_pstrdup(r->pool, *group);
}
sizeof(util_compare_subgroup_t));
tmp_local_sgl->len = compare_nodep->subgroupList->len;
tmp_local_sgl->subgroupDNs =
- apr_pcalloc(r->pool,
- sizeof(char *) * compare_nodep->subgroupList->len);
+ apr_palloc(r->pool,
+ sizeof(char *) * compare_nodep->subgroupList->len);
for (i = 0; i < compare_nodep->subgroupList->len; i++) {
tmp_local_sgl->subgroupDNs[i] =
apr_pstrdup(r->pool,
*binddn = apr_pstrdup(r->pool, search_nodep->dn);
if (attrs) {
int i;
- *retvals = apr_pcalloc(r->pool, sizeof(char *) * search_nodep->numvals);
+ *retvals = apr_palloc(r->pool, sizeof(char *) * search_nodep->numvals);
for (i = 0; i < search_nodep->numvals; i++) {
(*retvals)[i] = apr_pstrdup(r->pool, search_nodep->vals[i]);
}
for dir in $(EXPORT_DIRS_APR); do \
ls $$dir/ap[ru].h $$dir/ap[ru]_*.h 2>/dev/null; \
done; \
- ) | sort -u > $@
+ ) | sed -e s,//,/,g | sort -u > $@
exports.c: export_files
$(AWK) -f $(top_srcdir)/build/make_exports.awk `cat $?` > $@
#include "apr.h"
#include "apr_lib.h"
-#if defined(WIN32) || defined(OS2)
-#define NEED_ENHANCED_ESCAPES
#endif
+#if defined(WIN32) || defined(OS2)
+#define NEED_ENHANCED_ESCAPES
#endif
#if APR_HAVE_STDIO_H
int skipping = 0;
ap_errorlog_format_item *items = (ap_errorlog_format_item *)fmt->elts;
+ AP_DEBUG_ASSERT(fmt->nelts > 0);
for (i = 0; i < fmt->nelts; ++i) {
ap_errorlog_format_item *item = &items[i];
if (item->flags & AP_ERRORLOG_FLAG_FIELD_SEP) {
int done = 0;
int line_number = 0;
- if (r && r->connection) {
+ if (r) {
+ AP_DEBUG_ASSERT(r->connection != NULL);
c = r->connection;
}
&errstr_start, &errstr_end, fmt, args);
}
- if (!*errstr)
- {
+ if (!*errstr) {
/*
* Don't log empty lines. This can happen with once-per-conn/req
* info if an item with AP_ERRORLOG_FLAG_REQUIRED is NULL.