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  e13033a   reconstruct to load the default value for member variables
e13033a is described below

commit e13033aa297504ebfd0facf01dd9cbb269743179
Author: Zhilin Huang <[email protected]>
AuthorDate: Mon Feb 27 17:03:00 2017 +0800

    reconstruct to load the default value for member variables
---
 proxy/ControlMatcher.cc | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/proxy/ControlMatcher.cc b/proxy/ControlMatcher.cc
index a49f854..7981bf0 100644
--- a/proxy/ControlMatcher.cc
+++ b/proxy/ControlMatcher.cc
@@ -219,7 +219,7 @@ HostMatcher<Data, MatchResult>::NewEntry(matcher_line 
*line_info)
   error = cur_d->Init(line_info);
   if (error.failed()) {
     // There was a problem so undo the effects this function
-    memset(cur_d, 0, sizeof(Data));
+    new (cur_d) Data(); // reconstruct
   } else {
     // Fill in the matching info
     host_lookup->NewEntry(match_data, (line_info->type == MATCH_DOMAIN) ? true 
: false, cur_d);

-- 
To stop receiving notification emails like this one, please contact
['"[email protected]" <[email protected]>'].

Reply via email to