From 70f47e0f640fd44c69dca254695d79ef6f3829de Mon Sep 17 00:00:00 2001 From: Alexander Ostapenko Date: Thu, 5 Jul 2018 12:54:42 +0300 Subject: [PATCH] Avoid gcc-7 warning in conditional ternary operator (#1013). --- tempesta_fw/http_limits.c | 7 +++---- 1 file changed, 3 insertions(+), 4 deletions(-) diff --git a/tempesta_fw/http_limits.c b/tempesta_fw/http_limits.c index 83a9f690b8..cd5a2108e8 100644 --- a/tempesta_fw/http_limits.c +++ b/tempesta_fw/http_limits.c @@ -250,10 +250,9 @@ int prio0, prio1, prio3; */ #define __FRANG_CFG_VAR(name, member) \ const typeof(((FrangCfg *)0)->member) name = \ - (req->location \ - ? (req->location->frang_cfg->member \ - ? : tfw_vhost_global_frang_cfg()->member) \ - : tfw_vhost_global_frang_cfg()->member) + (req->location && req->location->frang_cfg->member \ + ? req->location->frang_cfg->member \ + : tfw_vhost_global_frang_cfg()->member) #define frang_msg(check, addr, fmt, ...) \ do { \