Couple more errors found by linting
This commit is contained in:
parent
4b6bae576d
commit
7c41737370
@ -263,7 +263,7 @@ func get_password(password string, password_file string, password_env string, us
|
||||
}
|
||||
ttyf, err := os.Open(tty.Ctermid())
|
||||
if err == nil {
|
||||
err = unix.Dup2(int(ttyf.Fd()), int(os.Stdin.Fd()))
|
||||
err = unix.Dup2(int(ttyf.Fd()), int(os.Stdin.Fd())) //nolint ineffassign err is returned indicating duping failed
|
||||
ttyf.Close()
|
||||
}
|
||||
}
|
||||
|
||||
@ -70,6 +70,9 @@ func TestRCSerialization(t *testing.T) {
|
||||
t.Fatal(err)
|
||||
}
|
||||
raw, err := io_data.serializer(&rc)
|
||||
if err != nil {
|
||||
t.Fatal(err)
|
||||
}
|
||||
var ec utils.EncryptedRemoteControlCmd
|
||||
err = json.Unmarshal([]byte(raw), &ec)
|
||||
if err != nil {
|
||||
|
||||
@ -108,7 +108,6 @@ func simple_socket_io(conn *net.Conn, io_data *rc_io_data) (serialized_response
|
||||
const (
|
||||
BEFORE_FIRST_ESCAPE_CODE_SENT = iota
|
||||
SENDING
|
||||
WAITING_FOR_RESPONSE
|
||||
)
|
||||
state := BEFORE_FIRST_ESCAPE_CODE_SENT
|
||||
|
||||
@ -124,7 +123,6 @@ func simple_socket_io(conn *net.Conn, io_data *rc_io_data) (serialized_response
|
||||
return
|
||||
}
|
||||
if len(chunk) == 0 {
|
||||
state = WAITING_FOR_RESPONSE
|
||||
break
|
||||
}
|
||||
err = write_many_to_conn(conn, []byte(cmd_escape_code_prefix), chunk, []byte(cmd_escape_code_suffix))
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user