mirror of
https://github.com/vlang/v.git
synced 2023-08-10 21:13:21 +03:00
checker: fixed array cannot implicitly convert to fooptr (again) (#9302)
This commit is contained in:
@ -157,7 +157,7 @@ pub fn (c &TcpConn) peer_ip() ?string {
|
||||
peeraddr := C.sockaddr_in{}
|
||||
speeraddr := sizeof(peeraddr)
|
||||
socket_error(C.getpeername(c.sock.handle, unsafe { &C.sockaddr(&peeraddr) }, &speeraddr)) ?
|
||||
cstr := charptr(C.inet_ntop(SocketFamily.inet, &peeraddr.sin_addr, buf, sizeof(buf)))
|
||||
cstr := charptr(C.inet_ntop(SocketFamily.inet, &peeraddr.sin_addr, &buf[0], sizeof(buf)))
|
||||
if cstr == 0 {
|
||||
return error('net.peer_ip: inet_ntop failed')
|
||||
}
|
||||
|
Reference in New Issue
Block a user