You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@trafficserver.apache.org by am...@apache.org on 2018/08/22 18:21:30 UTC
[trafficserver] branch master updated: Cleanup: Remove #define
INT_TO_BOOL, use local lambda instead.
This is an automated email from the ASF dual-hosted git repository.
amc pushed a commit to branch master
in repository https://gitbox.apache.org/repos/asf/trafficserver.git
The following commit(s) were added to refs/heads/master by this push:
new 3fc04c4 Cleanup: Remove #define INT_TO_BOOL, use local lambda instead.
3fc04c4 is described below
commit 3fc04c4590d7e47ba648b06f973c874d6ff900fc
Author: Alan M. Carroll <am...@apache.org>
AuthorDate: Wed Aug 22 10:03:11 2018 -0500
Cleanup: Remove #define INT_TO_BOOL, use local lambda instead.
---
proxy/http/HttpConfig.cc | 4 +---
1 file changed, 1 insertion(+), 3 deletions(-)
diff --git a/proxy/http/HttpConfig.cc b/proxy/http/HttpConfig.cc
index c632bee..48a960e 100644
--- a/proxy/http/HttpConfig.cc
+++ b/proxy/http/HttpConfig.cc
@@ -1233,7 +1233,7 @@ HttpConfig::startup()
void
HttpConfig::reconfigure()
{
-#define INT_TO_BOOL(i) ((i) ? 1 : 0);
+ auto INT_TO_BOOL = [](RecInt i) -> bool { return i != 0; };
HttpConfigParams *params;
@@ -1491,8 +1491,6 @@ HttpConfig::reconfigure()
params->negative_caching_list = m_master.negative_caching_list;
m_id = configProcessor.set(m_id, params);
-
-#undef INT_TO_BOOL
}
////////////////////////////////////////////////////////////////