Fix Windows lint errcheck/unused and Linux nilerr in console VNC fallback

This commit is contained in:
Viktor Liu
2026-05-16 17:23:36 +02:00
parent 62cf9e873b
commit 7123e6d1f4
5 changed files with 10 additions and 17 deletions

View File

@@ -41,12 +41,6 @@ const (
keyeventfScanCode = 0x0008
)
// winlogonDesktopName is the name of the Windows secure desktop that hosts the
// logon UI, Ctrl+Alt+Del screen, UAC prompts, and credential dialogs. Its
// clipboard is isolated from the interactive Default desktop, so pasting via
// the clipboard API does not work there. We fall back to synthesizing the
// text as Unicode keystrokes.
const winlogonDesktopName = "Winlogon"
// maxTypedClipboardChars caps the number of characters we will synthesize as
// keystrokes when falling back on the Winlogon desktop. Passwords are short;
@@ -258,7 +252,7 @@ func signalSAS() {
return
}
ev := windows.Handle(h)
defer windows.CloseHandle(ev)
defer func() { _ = windows.CloseHandle(ev) }()
if err := windows.SetEvent(ev); err != nil {
log.Warnf("SetEvent SAS: %v", err)
} else {