1
0
mirror of https://github.com/vlang/v.git synced 2023-08-10 21:13:21 +03:00

vlib: fix missing else{} in match statements

This commit is contained in:
Alexander Medvednikov
2019-12-07 17:13:25 +03:00
parent 2fb7fba856
commit ad6adf327e
15 changed files with 88 additions and 85 deletions

View File

@ -277,7 +277,7 @@ pub fn (s Socket) 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 := int(C.recv(s.sockfd, buf, MAX_READ-1, MSG_PEEK))
n := C.recv(s.sockfd, buf, MAX_READ-1, MSG_PEEK)
if n == -1 { return res }
if n == 0 { return res }
buf[n] = `\0`