Skip to content

Commit

Permalink
nit: refactor AddHostName
Browse files Browse the repository at this point in the history
Signed-off-by: Nathanael Bracy <[email protected]>
  • Loading branch information
servusdei2018 committed May 14, 2024
1 parent 70a872d commit eb3c64f
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions src/quicreach.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -103,14 +103,14 @@ void IncStat( _Inout_ _Interlocked_operand_ uint32_t volatile &Addend) {
void AddHostName(const char* arg) {
// Parse hostname(s), treating '*' as all top-level domains.
if (!strcmp(arg, "*")) {
for (auto Domain : TopDomains) {
for (const auto& Domain : TopDomains) {
Config.HostNames.push_back(Domain);
}
} else {
char* HostName = (char*)arg;
char* HostName = const_cast<char*>(arg);
do {
char* End = strchr(HostName, ',');
if (End) *End = 0;
if (End) *End = '\0';
Config.HostNames.push_back(HostName);
if (!End) break;
HostName = End + 1;
Expand Down

0 comments on commit eb3c64f

Please sign in to comment.