Copilot commented on code in PR #13194:
URL: https://github.com/apache/trafficserver/pull/13194#discussion_r3337453746
##########
include/tscore/MatcherUtils.h:
##########
@@ -32,8 +32,9 @@
#pragma once
#include "tscore/ParseRules.h"
-#include "tscore/Result.h"
#include "tscore/ink_inet.h"
+#include "tscore/ink_inet.h"
+#include "tscore/ink_platform.h"
Review Comment:
The header now includes `tscore/ink_inet.h` twice, which is redundant and
likely accidental. Please keep only a single include.
##########
src/tscore/MatcherUtils.cc:
##########
@@ -144,7 +142,7 @@ unescapifyStr(char *buffer)
if (*read == '%' && *(read + 1) != '\0' && *(read + 2) != '\0') {
subStr[0] = *(++read);
subStr[1] = *(++read);
- *write = static_cast<char>(strtol(subStr, (char **)nullptr, 16));
+ *write = static_cast<char>(strtol(subStr, static_cast<char
**>(nullptr), 16));
read++;
Review Comment:
`strtol` takes a `char **endptr`; `nullptr` is already implicitly
convertible, so the `static_cast<char **>(nullptr)` is unnecessary and adds
noise. Using `nullptr` directly is consistent with other code in the repo and
still avoids the clang-tidy C-style cast warning.
--
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]