Remove unnecessary cast.

This commit is contained in:
Claudiu-Vlad Ursache 2014-01-26 12:36:05 +01:00
parent 53f2ebce5f
commit bf209ca2ba
1 changed files with 2 additions and 2 deletions

4
odb.go
View File

@ -83,12 +83,12 @@ func (v *Odb) ForEach() chan *Oid {
func (v *Odb) Hash(data []byte, otype ObjectType) (oid *Oid, err error) {
oid = new(Oid)
header := (*reflect.SliceHeader)(unsafe.Pointer(&data))
ptr := (*C.char)(unsafe.Pointer(header.Data))
ptr := unsafe.Pointer(header.Data)
runtime.LockOSThread()
defer runtime.UnlockOSThread()
ret := C.git_odb_hash(oid.toC(), unsafe.Pointer(ptr), C.size_t(header.Len), C.git_otype(otype));
ret := C.git_odb_hash(oid.toC(), ptr, C.size_t(header.Len), C.git_otype(otype));
if ret < 0 {
err = LastError()
}