Skip to content

Commit de84ed8

Browse files
committed
fix: golangci-lint
1 parent e419026 commit de84ed8

File tree

2 files changed

+2
-2
lines changed

2 files changed

+2
-2
lines changed

mux/shard_queue_test.go

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -57,7 +57,7 @@ func TestShardQueue(t *testing.T) {
5757
// test
5858
queue := NewShardQueue(4, conn)
5959
count, pkgsize := 16, 11
60-
for i := 0; i < int(count); i++ {
60+
for i := 0; i < count; i++ {
6161
var getter WriterGetter = func() (buf netpoll.Writer, isNil bool) {
6262
buf = netpoll.NewLinkBuffer(pkgsize)
6363
buf.Malloc(pkgsize)

sys_sendmsg_linux.go

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -43,7 +43,7 @@ func sendmsg(fd int, bs [][]byte, ivs []syscall.Iovec, zerocopy bool) (n int, er
4343
r, _, e := syscall.RawSyscall(syscall.SYS_SENDMSG, uintptr(fd), uintptr(unsafe.Pointer(&msghdr)), 0)
4444
resetIovecs(bs, ivs[:iovLen])
4545
if e != 0 {
46-
return int(r), syscall.Errno(e)
46+
return int(r), e
4747
}
4848
return int(r), nil
4949
}

0 commit comments

Comments
 (0)