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:
@ -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)
|
||||
|
Reference in New Issue
Block a user