bryancall commented on code in PR #13004:
URL: https://github.com/apache/trafficserver/pull/13004#discussion_r2963594029
##########
include/proxy/http/HttpVCTable.h:
##########
@@ -41,17 +41,17 @@ enum class HttpVC_t {
};
struct HttpVCTableEntry {
- VConnection *vc;
- MIOBuffer *read_buffer;
- MIOBuffer *write_buffer;
- VIO *read_vio;
- VIO *write_vio;
- HttpSMHandler vc_read_handler;
- HttpSMHandler vc_write_handler;
- HttpVC_t vc_type;
- HttpSM *sm;
- bool eos;
- bool in_tunnel;
+ VConnection *vc{nullptr};
+ MIOBuffer *read_buffer{nullptr};
+ MIOBuffer *write_buffer{nullptr};
+ VIO *read_vio{nullptr};
+ VIO *write_vio{nullptr};
+ HttpSMHandler vc_read_handler{};
+ HttpSMHandler vc_write_handler{};
+ HttpVC_t vc_type{HttpVC_t::UNKNOWN};
+ HttpSM *sm{nullptr};
Review Comment:
Good catch. Removed the `memset` and replaced it with a proper initializer
list: `HttpVCTable::HttpVCTable(HttpSM *mysm) : sm(mysm) {}`. All in-class
defaults are zero-equivalent, so the `memset` was redundant, and using `memset`
on pointer-to-member-function types (`HttpSMHandler`) is technically
non-portable. Fixed in 3ce9678.
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: [email protected]
For queries about this service, please contact Infrastructure at:
[email protected]