add to check err
Signed-off-by: lixiaobing10051267 <li.xiaobing1@zte.com.cn> Upstream-commit: b4833e3b3d683242c016e64d8de7385fcb4c8932 Component: engine
This commit is contained in:
@ -56,7 +56,7 @@ func GetOSVersion() OSVersion {
|
||||
func IsWindowsClient() bool {
|
||||
osviex := &osVersionInfoEx{OSVersionInfoSize: 284}
|
||||
r1, _, err := procGetVersionExW.Call(uintptr(unsafe.Pointer(osviex)))
|
||||
if r1 == 0 {
|
||||
if err != nil || r1 == 0 {
|
||||
logrus.Warnf("GetVersionExW failed - assuming server SKU: %v", err)
|
||||
return false
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user