Skip to content

Commit

Permalink
Add arguments to naked returns
Browse files Browse the repository at this point in the history
  • Loading branch information
tajtiattila committed Dec 15, 2015
1 parent 2468af4 commit f5b5afd
Showing 1 changed file with 6 additions and 6 deletions.
12 changes: 6 additions & 6 deletions serial_windows.go
Original file line number Diff line number Diff line change
Expand Up @@ -60,25 +60,25 @@ func openPort(name string, baud int, databits byte, parity Parity, stopbits Stop
}()

if err = setCommState(h, baud, databits, parity, stopbits); err != nil {
return
return nil, err
}
if err = setupComm(h, 64, 64); err != nil {
return
return nil, err
}
if err = setCommTimeouts(h, readTimeout); err != nil {
return
return nil, err
}
if err = setCommMask(h); err != nil {
return
return nil, err
}

ro, err := newOverlapped()
if err != nil {
return
return nil, err
}
wo, err := newOverlapped()
if err != nil {
return
return nil, err
}
port := new(Port)
port.f = f
Expand Down

0 comments on commit f5b5afd

Please sign in to comment.