summaryrefslogtreecommitdiffhomepage
diff options
context:
space:
mode:
authorAlejandro Colomar <alx.manpages@gmail.com>2022-05-17 12:20:19 +0200
committerAlejandro Colomar <alx.manpages@gmail.com>2022-05-17 12:41:18 +0200
commit7662ec5f1bf27de981a8aa100ab2c5c3fa985269 (patch)
tree4bb25263407154da61163b772c37b0c9f4cbac0c
parentba20fa3939c1505866d715a5a1a43f61a4f8de17 (diff)
downloadunit-7662ec5f1bf27de981a8aa100ab2c5c3fa985269.tar.gz
unit-7662ec5f1bf27de981a8aa100ab2c5c3fa985269.tar.bz2
Wrapped debug code in '#if (NXT_DEBUG)'.
-rw-r--r--src/nxt_http_return.c5
1 files changed, 4 insertions, 1 deletions
diff --git a/src/nxt_http_return.c b/src/nxt_http_return.c
index 8832941f..82c91568 100644
--- a/src/nxt_http_return.c
+++ b/src/nxt_http_return.c
@@ -73,12 +73,14 @@ nxt_http_return(nxt_task_t *task, nxt_http_request_t *r,
nxt_http_action_t *action)
{
nxt_int_t ret;
- nxt_str_t loc;
nxt_http_return_ctx_t *ctx;
nxt_http_return_conf_t *conf;
conf = action->u.conf;
+#if (NXT_DEBUG)
+ nxt_str_t loc;
+
if (conf->location == NULL) {
nxt_str_set(&loc, "");
@@ -87,6 +89,7 @@ nxt_http_return(nxt_task_t *task, nxt_http_request_t *r,
}
nxt_debug(task, "http return: %d (loc: \"%V\")", conf->status, &loc);
+#endif
if (conf->status >= NXT_HTTP_BAD_REQUEST
&& conf->status <= NXT_HTTP_SERVER_ERROR_MAX)