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

checker: string != IError (#10665)

This commit is contained in:
shadowninja55
2021-07-04 22:05:08 -04:00
committed by GitHub
parent 6aecda3be8
commit da9c75f2ca
7 changed files with 17 additions and 9 deletions

View File

@ -485,7 +485,7 @@ pub fn hostname() string {
size := u32(255)
res := C.GetComputerNameW(&hostname[0], &size)
if !res {
return error(get_error_msg(int(C.GetLastError())))
return get_error_msg(int(C.GetLastError()))
}
return unsafe { string_from_wide(&hostname[0]) }
}
@ -495,7 +495,7 @@ pub fn loginname() string {
size := u32(255)
res := C.GetUserNameW(&loginname[0], &size)
if !res {
return error(get_error_msg(int(C.GetLastError())))
return get_error_msg(int(C.GetLastError()))
}
return unsafe { string_from_wide(&loginname[0]) }
}