From: Ben Laurie Date: Sat, 3 Jan 2004 14:35:21 +0000 (+0000) Subject: Use ap_assert(). X-Git-Tag: pre_ajp_proxy~890 X-Git-Url: https://granicus.if.org/sourcecode?a=commitdiff_plain;h=069b75134bc1c710ef95554ad16da216957b7d41;p=apache Use ap_assert(). git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/trunk@102152 13f79535-47bb-0310-9956-ffa450edef68 --- diff --git a/modules/loggers/mod_log_forensic.c b/modules/loggers/mod_log_forensic.c index 16f17e90d5..a96b213102 100644 --- a/modules/loggers/mod_log_forensic.c +++ b/modules/loggers/mod_log_forensic.c @@ -71,7 +71,6 @@ #include "httpd.h" #include "http_config.h" #include "http_log.h" -#include #include "apr_strings.h" #include "apr_atomic.h" #include @@ -156,9 +155,9 @@ static int log_init(apr_pool_t *pc, apr_pool_t *p, apr_pool_t *pt, static char *log_escape(char *q, const char *e, const char *p) { for ( ; *p ; ++p) { - assert(q < e); + ap_assert(q < e); if (*p < ' ' || *p >= 0x7f || *p == '|' || *p == ':' || *p == '%') { - assert(q+2 < e); + ap_assert(q+2 < e); *q++ = '%'; sprintf(q, "%02x", *(unsigned char *)p); q += 2; @@ -166,7 +165,7 @@ static char *log_escape(char *q, const char *e, const char *p) else *q++ = *p; } - assert(q < e); + ap_assert(q < e); *q = '\0'; return q; @@ -252,12 +251,12 @@ static int log_before(request_rec *r) apr_table_do(log_headers, &h, r->headers_in, NULL); - assert(h.pos < h.end); + ap_assert(h.pos < h.end); *h.pos++ = '\n'; n = h.count-1; rv = apr_file_write(cfg->fd, h.log, &n); - assert(rv == APR_SUCCESS && n == h.count-1); + ap_assert(rv == APR_SUCCESS && n == h.count-1); apr_table_setn(r->notes, "forensic-id", id); @@ -281,7 +280,7 @@ static int log_after(request_rec *r) s = apr_pstrcat(r->pool, "-", id, "\n", NULL); l = n = strlen(s); rv = apr_file_write(cfg->fd, s, &n); - assert(rv == APR_SUCCESS && n == l); + ap_assert(rv == APR_SUCCESS && n == l); return OK; }