File tree 2 files changed +4
-4
lines changed
2 files changed +4
-4
lines changed Original file line number Diff line number Diff line change @@ -25,5 +25,5 @@ func SetRaw(fd int) error {
25
25
n .Cc [syscall .VMIN ] = 1
26
26
n .Cc [syscall .VTIME ] = 0
27
27
28
- return termios .Tcsetattr (uintptr (fd ), termios .TCSANOW , (* unix .Termios )(n ))
28
+ return termios .Tcsetattr (uintptr (fd ), termios .TCSANOW , (* unix .Termios )(& n ))
29
29
}
Original file line number Diff line number Diff line change @@ -15,13 +15,13 @@ var (
15
15
saveTermiosOnce sync.Once
16
16
)
17
17
18
- func getOriginalTermios (fd int ) (* unix.Termios , error ) {
18
+ func getOriginalTermios (fd int ) (unix.Termios , error ) {
19
19
var err error
20
20
saveTermiosOnce .Do (func () {
21
21
saveTermiosFD = fd
22
22
saveTermios , err = termios .Tcgetattr (uintptr (fd ))
23
23
})
24
- return saveTermios , err
24
+ return * saveTermios , err
25
25
}
26
26
27
27
// Restore terminal's mode.
@@ -30,5 +30,5 @@ func Restore() error {
30
30
if err != nil {
31
31
return err
32
32
}
33
- return termios .Tcsetattr (uintptr (saveTermiosFD ), termios .TCSANOW , o )
33
+ return termios .Tcsetattr (uintptr (saveTermiosFD ), termios .TCSANOW , & o )
34
34
}
You can’t perform that action at this time.
0 commit comments