Fix some 'bugs' flagged by sonarcloud

This commit is contained in:
Bond_009
2020-05-25 23:52:51 +02:00
parent 777c9c7bc9
commit 10e381f66f
18 changed files with 126 additions and 133 deletions

View File

@@ -208,8 +208,9 @@ namespace Emby.Server.Implementations.SocketSharp
private static string GetQueryStringContentType(HttpRequest httpReq)
{
ReadOnlySpan<char> format = httpReq.Query["format"].ToString();
if (format == null)
string formatStr = httpReq.Query["format"].ToString();
ReadOnlySpan<char> format = formatStr;
if (formatStr == null)
{
const int FormatMaxLength = 4;
ReadOnlySpan<char> pi = httpReq.Path.ToString();