bneradt commented on code in PR #13518:
URL: https://github.com/apache/trafficserver/pull/13518#discussion_r3738560373


##########
src/api/InkAPI.cc:
##########
@@ -23,6 +23,7 @@
 
 #include <atomic>
 #include <charconv>
+#include <new>
 #include <tuple>
 #include <unordered_map>

Review Comment:
   Added the direct <type_traits> include.



##########
src/api/InkAPI.cc:
##########
@@ -7775,24 +7776,31 @@ TSHttpTxnCloseAfterResponse(TSHttpTxn txnp, int 
should_close)
 }
 
 // Parse a port descriptor for the proxy.config.http.server_ports descriptor 
format.
-TSPortDescriptor
-TSPortDescriptorParse(const char *descriptor)
+TSReturnCode
+TSPortDescriptorParse(const char *descriptor, TSPortDescriptor *result)
 {
-  HttpProxyPort *port = new HttpProxyPort();
+  static_assert(sizeof(TSPortDescriptor) == sizeof(HttpProxyPort));
+  static_assert(alignof(TSPortDescriptor) == alignof(HttpProxyPort));
+  static_assert(std::is_trivially_destructible_v<HttpProxyPort>);

Review Comment:
   Changed the size and alignment assertions to verify sufficient capacity.



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

Reply via email to