Skip to content

Commit

Permalink
[CBRD-25245] 10.2, case insensitive are_hostnames_equal () (#5014)
Browse files Browse the repository at this point in the history
case insensitive are_hostnames_equal ()
  • Loading branch information
kisoo-han authored Mar 6, 2024
1 parent a25901c commit 225e884
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions src/executables/util_common.c
Original file line number Diff line number Diff line change
Expand Up @@ -452,7 +452,7 @@ are_hostnames_equal (const char *hostname_a, const char *hostname_b)
const char *a;
const char *b;

for (a = hostname_a, b = hostname_b; *a && *b && (*a == *b); ++a, ++b)
for (a = hostname_a, b = hostname_b; *a && *b && (toupper (*a) == toupper (*b)); ++a, ++b)
;

if (*a == '\0' && *b != '\0')
Expand All @@ -465,7 +465,7 @@ are_hostnames_equal (const char *hostname_a, const char *hostname_b)
}
else
{
return *a == *b;
return toupper (*a) == toupper (*b);
}
}

Expand Down

0 comments on commit 225e884

Please sign in to comment.