From 42335d37400488fc613decf8082b5488390a8b43 Mon Sep 17 00:00:00 2001 From: Jared Goodwin Date: Wed, 12 Aug 2020 19:54:40 -0700 Subject: [PATCH] Minor refactor. --- Agent/Services/Updater.cs | 3 +-- Shared/Win32/Win32Interop.cs | 3 +-- 2 files changed, 2 insertions(+), 4 deletions(-) diff --git a/Agent/Services/Updater.cs b/Agent/Services/Updater.cs index 0402322e6..192d2fc64 100644 --- a/Agent/Services/Updater.cs +++ b/Agent/Services/Updater.cs @@ -180,8 +180,7 @@ await wc.DownloadFileTaskAsync( private class WebClientEx : WebClient - { - private int _requestTimeout; + { private readonly int _requestTimeout; public WebClientEx(int requestTimeout) { diff --git a/Shared/Win32/Win32Interop.cs b/Shared/Win32/Win32Interop.cs index 52ac8bf8e..eb087f5ee 100644 --- a/Shared/Win32/Win32Interop.cs +++ b/Shared/Win32/Win32Interop.cs @@ -65,8 +65,7 @@ public static bool GetCurrentDesktop(out string desktopName) try { byte[] deskBytes = new byte[256]; - uint lenNeeded; - if (!GetUserObjectInformationW(inputDesktop, UOI_NAME, deskBytes, 256, out lenNeeded)) + if (!GetUserObjectInformationW(inputDesktop, UOI_NAME, deskBytes, 256, out uint lenNeeded)) { desktopName = string.Empty; return false;