Github user PSUdaemon commented on a diff in the pull request:

    https://github.com/apache/trafficserver/pull/834#discussion_r78214876
  
    --- Diff: proxy/ParentConsistentHash.cc ---
    @@ -58,29 +61,131 @@ ParentConsistentHash::~ParentConsistentHash()
       delete chash[SECONDARY];
     }
     
    +void
    +ParentConsistentHash::getPathHash_Helper(char *buffer, int size, const 
char *tmp, int len)
    +{
    +  int slen;
    +  int max = size - 1;
    +  slen    = (len > max) ? max : len;
    +  strncpy(buffer, tmp, slen);
    +  buffer[slen] = 0;
    +}
    --- End diff --
    
    This should be a static function and not a class method IMO.
    
    Also, I was somehow commenting on an old diff, but you should use the 
`MIN()` macro here too.


---
If your project is set up for it, you can reply to this email and have your
reply appear on GitHub as well. If your project does not have this feature
enabled and wishes so, or if the feature is enabled but not working, please
contact infrastructure at [email protected] or file a JIRA ticket
with INFRA.
---

Reply via email to