summaryrefslogtreecommitdiffstats
path: root/modules/loggers
diff options
context:
space:
mode:
authorJeff Trawick <trawick@apache.org>2013-11-15 23:03:16 +0100
committerJeff Trawick <trawick@apache.org>2013-11-15 23:03:16 +0100
commit30f8aa646039547fadf1c556b4ad43d6595eaa3f (patch)
tree30b8e64e920b47b91c8ea2a8c5b3d1ba37ca1f79 /modules/loggers
parentFollow-up to r1540161: (diff)
downloadapache2-30f8aa646039547fadf1c556b4ad43d6595eaa3f.tar.xz
apache2-30f8aa646039547fadf1c556b4ad43d6595eaa3f.zip
more apr_file_write_full() simplification (like r1542413)
git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/trunk@1542416 13f79535-47bb-0310-9956-ffa450edef68
Diffstat (limited to 'modules/loggers')
-rw-r--r--modules/loggers/mod_log_forensic.c14
1 files changed, 6 insertions, 8 deletions
diff --git a/modules/loggers/mod_log_forensic.c b/modules/loggers/mod_log_forensic.c
index f29aec3ef7..359cd63935 100644
--- a/modules/loggers/mod_log_forensic.c
+++ b/modules/loggers/mod_log_forensic.c
@@ -185,7 +185,6 @@ static int log_before(request_rec *r)
&log_forensic_module);
const char *id;
hlog h;
- apr_size_t n;
apr_status_t rv;
if (!cfg->fd || r->prev) {
@@ -221,9 +220,8 @@ static int log_before(request_rec *r)
ap_assert(h.pos < h.end);
*h.pos++ = '\n';
- n = h.count-1;
- rv = apr_file_write_full(cfg->fd, h.log, n, &n);
- ap_assert(rv == APR_SUCCESS && n == h.count-1);
+ rv = apr_file_write_full(cfg->fd, h.log, h.count-1, NULL);
+ ap_assert(rv == APR_SUCCESS);
apr_table_setn(r->notes, "forensic-id", id);
@@ -237,7 +235,7 @@ static int log_after(request_rec *r)
const char *id = ap_get_module_config(r->request_config,
&log_forensic_module);
char *s;
- apr_size_t l, n;
+ apr_size_t n;
apr_status_t rv;
if (!cfg->fd || id == NULL) {
@@ -245,9 +243,9 @@ static int log_after(request_rec *r)
}
s = apr_pstrcat(r->pool, "-", id, "\n", NULL);
- l = n = strlen(s);
- rv = apr_file_write_full(cfg->fd, s, n, &n);
- ap_assert(rv == APR_SUCCESS && n == l);
+ n = strlen(s);
+ rv = apr_file_write_full(cfg->fd, s, n, NULL);
+ ap_assert(rv == APR_SUCCESS);
return OK;
}