summaryrefslogtreecommitdiffhomepage
path: root/src/nxt_buf.c
diff options
context:
space:
mode:
authorValentin Bartenev <vbart@nginx.com>2018-03-05 17:32:50 +0300
committerValentin Bartenev <vbart@nginx.com>2018-03-05 17:32:50 +0300
commit912a49c6091c1fd9b630d2e0966f0fe1b97a3e42 (patch)
tree5581735807436384796dfd9deff336865c8372e4 /src/nxt_buf.c
parentf2090bce21e4fb47d11f992a76ef5c4da74c3233 (diff)
downloadunit-912a49c6091c1fd9b630d2e0966f0fe1b97a3e42.tar.gz
unit-912a49c6091c1fd9b630d2e0966f0fe1b97a3e42.tar.bz2
Reduced number of critical log levels.
Diffstat (limited to 'src/nxt_buf.c')
-rw-r--r--src/nxt_buf.c23
1 files changed, 3 insertions, 20 deletions
diff --git a/src/nxt_buf.c b/src/nxt_buf.c
index 36a1dcd0..c764fecd 100644
--- a/src/nxt_buf.c
+++ b/src/nxt_buf.c
@@ -202,13 +202,7 @@ nxt_buf_completion(nxt_task_t *task, void *obj, void *data)
nxt_debug(task, "buf completion: %p %p", b, b->mem.start);
-#if (NXT_DEBUG)
- if (nxt_slow_path(data != b->parent)) {
- nxt_log_alert(task->log, "completion data (%p) != b->parent (%p)",
- data, b->parent);
- nxt_abort();
- }
-#endif
+ nxt_assert(data == b->parent);
mp = b->data;
nxt_mp_free(mp, b);
@@ -235,12 +229,7 @@ nxt_buf_ts_handle(nxt_task_t *task, void *obj, void *data)
b = obj;
-#if (NXT_DEBUG)
- if (nxt_slow_path(b->is_ts == 0)) {
- nxt_log_alert(task->log, "not a thread safe buf (%p) completed", b);
- nxt_abort();
- }
-#endif
+ nxt_assert(b->is_ts != 0);
ts = nxt_pointer_to(b, NXT_BUF_MEM_SIZE);
@@ -277,13 +266,7 @@ nxt_buf_ts_completion(nxt_task_t *task, void *obj, void *data)
nxt_debug(task, "buf ts completion: %p %p", b, b->mem.start);
-#if (NXT_DEBUG)
- if (nxt_slow_path(data != b->parent)) {
- nxt_log_alert(task->log, "completion data (%p) != b->parent (%p)",
- data, b->parent);
- nxt_abort();
- }
-#endif
+ nxt_assert(data == b->parent);
mp = b->data;
nxt_mp_free(mp, b);