diff options
author | Jason A. Donenfeld <Jason@zx2c4.com> | 2021-10-12 11:44:08 -0600 |
---|---|---|
committer | Jason A. Donenfeld <Jason@zx2c4.com> | 2021-10-12 11:44:08 -0600 |
commit | d0663c3c94ba75a6d11312fd24dfd2713c9b431b (patch) | |
tree | 5a968153526b7e898f46405dd09f0a3e97171909 /version | |
parent | manager: use newer wireguard-go APIs (diff) | |
download | wireguard-windows-d0663c3c94ba75a6d11312fd24dfd2713c9b431b.tar.xz wireguard-windows-d0663c3c94ba75a6d11312fd24dfd2713c9b431b.zip |
global: use unsafe.Add where possible
Signed-off-by: Jason A. Donenfeld <Jason@zx2c4.com>
Diffstat (limited to 'version')
-rw-r--r-- | version/official.go | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/version/official.go b/version/official.go index 5998124c..00089ca0 100644 --- a/version/official.go +++ b/version/official.go @@ -146,7 +146,7 @@ func extractCertificatePolicies(path string, oid string) ([]string, error) { return nil, err } for i := uintptr(0); i < uintptr(certPoliciesInfo.Count); i++ { - cp := (*windows.CertPolicyInfo)(unsafe.Pointer(uintptr(unsafe.Pointer(certPoliciesInfo.PolicyInfos)) + i*unsafe.Sizeof(*certPoliciesInfo.PolicyInfos))) + cp := (*windows.CertPolicyInfo)(unsafe.Add(unsafe.Pointer(certPoliciesInfo.PolicyInfos), i*unsafe.Sizeof(*certPoliciesInfo.PolicyInfos))) policies = append(policies, windows.BytePtrToString(cp.Identifier)) } } |