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

parser: warn when fixed-size ArrayInit doesn't have trailing {}. (#6137)

This commit is contained in:
Nick Treleaven
2020-08-16 03:54:05 +01:00
committed by GitHub
parent a02593204f
commit bab5c21224
15 changed files with 27 additions and 28 deletions

View File

@ -3,7 +3,7 @@ module net
fn C.gethostname() int
// hostname returns the host name reported by the kernel.
pub fn hostname() ?string {
mut name := [256]byte
mut name := [256]byte{}
// https://www.ietf.org/rfc/rfc1035.txt
// The host name is returned as a null-terminated string.
namebp := byteptr(name)