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

    https://github.com/apache/trafficserver/pull/1007#discussion_r78409374
  
    --- Diff: iocore/net/NetVConnection.cc ---
    @@ -43,3 +44,39 @@ NetVConnection::cancel_OOB()
     {
       return;
     }
    +
    +const char *
    +NetVCOptions::get_proto_string() const
    +{
    +  const char *retval;
    +  switch (ip_proto) {
    +  case USE_TCP:
    +    retval = TS_PROTO_TAG_TCP;
    +    break;
    +  case USE_UDP:
    +    retval = TS_PROTO_TAG_UDP;
    +    break;
    +  default:
    +    retval = NULL;
    +    break;
    +  }
    +  return retval;
    +}
    --- End diff --
    
    I think this would be more succinct:
    ```C
    switch (ip_proto) {
      case USE_TCP:
        return TS_PROTO_TAG_TCP;
     case USE_UDP:
      return TS_PROTO_TAG_UDP;
     default:
        return NULL;
     }
    ```


---
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