util/UriUtil: make schemes array static

This commit is contained in:
Max Kellermann 2020-06-22 22:48:03 +02:00
parent 5716cde1fb
commit 43c32372e7

View File

@ -167,7 +167,11 @@ gcc_pure
static const char *
SkipUriScheme(const char *uri) noexcept
{
const char *const schemes[] = { "http://", "https://", "ftp://" };
static const char *const schemes[] = {
"http://", "https://",
"ftp://",
};
for (auto scheme : schemes) {
auto result = StringAfterPrefixCaseASCII(uri, scheme);
if (result != nullptr)