From e4fa855f7b3a4b47b63a3d2cb013ca1662913b76 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Miroslav=20=C5=A0ediv=C3=BD?= Date: Wed, 4 Nov 2020 00:41:04 +0100 Subject: [PATCH] linter fix. --- internal/desktop/xorg/xorg.go | 4 +--- internal/session/session.go | 2 +- 2 files changed, 2 insertions(+), 4 deletions(-) diff --git a/internal/desktop/xorg/xorg.go b/internal/desktop/xorg/xorg.go index 09805d88..dfe5ebe8 100644 --- a/internal/desktop/xorg/xorg.go +++ b/internal/desktop/xorg/xorg.go @@ -35,9 +35,7 @@ func DisplayOpen(display string) error { displayUnsafe := C.CString(display) defer C.free(unsafe.Pointer(displayUnsafe)) - var err C.int - err = C.XDisplayOpen(displayUnsafe) - + err := C.XDisplayOpen(displayUnsafe) if int(err) == 1 { return fmt.Errorf("Could not open display %s.", display) } diff --git a/internal/session/session.go b/internal/session/session.go index b1f7071c..4207a528 100644 --- a/internal/session/session.go +++ b/internal/session/session.go @@ -79,7 +79,7 @@ func (session *SessionCtx) SetConnected(connected bool) { session.socket = nil // TODO: Refactor. - session.manager.Destroy(session.id) + _ = session.manager.Destroy(session.id) } }