From 53a87e134e898937d6e59177c5731533fbba0558 Mon Sep 17 00:00:00 2001 From: Christopher Faulet Date: Tue, 21 Jan 2020 10:13:03 +0100 Subject: [PATCH] CLEANUP: http-ana: Remove useless test on txn when the error message is retrieved In http_error_message(), the HTTP txn is always defined. So, this is no reason to test its nullity. This patch partially fixes the issue #457. --- src/http_ana.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/http_ana.c b/src/http_ana.c index 82a9e14a2..23db04ece 100644 --- a/src/http_ana.c +++ b/src/http_ana.c @@ -4603,7 +4603,7 @@ struct buffer *http_error_message(struct stream *s) { const int msgnum = http_get_status_idx(s->txn->status); - if (s->txn && s->txn->errmsg) + if (s->txn->errmsg) return s->txn->errmsg; else if (s->be->errmsg[msgnum]) return s->be->errmsg[msgnum]; -- 2.47.3