1
0
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:
Nick Treleaven
2021-03-15 13:55:07 +00:00
committed by GitHub
parent 9d168895ed
commit 446631ceb5
15 changed files with 58 additions and 32 deletions

View File

@ -15,7 +15,7 @@ pub fn (mut con TcpConn) read_line() string {
mut res := '' // The final result, including the ending \n.
for {
mut line := '' // The current line. Can be a partial without \n in it.
n := C.recv(con.sock.handle, buf, max_read - 1, msg_peek | msg_nosignal)
n := C.recv(con.sock.handle, &buf[0], max_read - 1, msg_peek | msg_nosignal)
if n == -1 {
return res
}
@ -41,12 +41,12 @@ pub fn (mut con TcpConn) read_line() string {
// Ensure that the block till the first \n (including it)
// is removed from the socket's receive queue, so that it does
// not get read again.
C.recv(con.sock.handle, buf, eol_idx + 1, msg_nosignal)
C.recv(con.sock.handle, &buf[0], eol_idx + 1, msg_nosignal)
res += line
break
}
// recv returned a buffer without \n in it .
C.recv(con.sock.handle, buf, n, msg_nosignal)
C.recv(con.sock.handle, &buf[0], n, msg_nosignal)
res += line
res += crlf
break