Commit c3209e4b authored by Daniel P. Berrange's avatar Daniel P. Berrange

Add missing unsafe.Pointer() casts for Go 1.5 compat

Signed-off-by: default avatarDaniel P. Berrange <berrange@redhat.com>
parent acc31ac1
......@@ -60,7 +60,7 @@ func (d *Domain) LxcOpenNamespace(flags uint32) ([]os.File, error) {
cfd = *(*C.int)(unsafe.Pointer(uintptr(unsafe.Pointer(cfdlist)) + (unsafe.Sizeof(cfd) * uintptr(i))))
fdlist[i] = *os.NewFile(uintptr(cfd), "namespace")
}
defer C.free(cfdlist)
defer C.free(unsafe.Pointer(cfdlist))
return fdlist, nil
}
......@@ -82,7 +82,7 @@ func (d *Domain) LxcEnterNamespace(fdlist []os.File, flags uint32) ([]os.File, e
cfd = *(*C.int)(unsafe.Pointer(uintptr(unsafe.Pointer(coldfdlist)) + (unsafe.Sizeof(cfd) * uintptr(i))))
oldfdlist[i] = *os.NewFile(uintptr(cfd), "namespace")
}
defer C.free(coldfdlist)
defer C.free(unsafe.Pointer(coldfdlist))
return oldfdlist, nil
}
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment