1
0
mirror of https://github.com/Radarr/Radarr.git synced 2026-04-25 22:37:27 -04:00

Fixed: Avoid zero-length array memory allocations

This commit is contained in:
Qstick
2020-10-02 14:29:25 -04:00
parent 295b975046
commit 4ec71538b9
34 changed files with 64 additions and 55 deletions
@@ -349,7 +349,7 @@ namespace NzbDrone.Core.Download.Clients.Deluge
{
if (result.Torrents == null)
{
return new DelugeTorrent[0];
return Array.Empty<DelugeTorrent>();
}
return result.Torrents.Values.ToArray();
@@ -106,7 +106,7 @@ namespace NzbDrone.Core.Download.Clients.Hadouken
{
if (torrentsRaw == null)
{
return new HadoukenTorrent[0];
return Array.Empty<HadoukenTorrent>();
}
var torrents = new List<HadoukenTorrent>();
@@ -17,7 +17,7 @@ namespace NzbDrone.Core.Download.TrackedDownloads
public TrackedDownload()
{
StatusMessages = new TrackedDownloadStatusMessage[] { };
StatusMessages = System.Array.Empty<TrackedDownloadStatusMessage>();
}
public void Warn(string message, params object[] args)