From bf209ca2ba293116bdd3062ba9ff5ac071f9ddd5 Mon Sep 17 00:00:00 2001 From: Claudiu-Vlad Ursache Date: Sun, 26 Jan 2014 12:36:05 +0100 Subject: [PATCH] Remove unnecessary cast. --- odb.go | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/odb.go b/odb.go index 6d18ce9..953791c 100644 --- a/odb.go +++ b/odb.go @@ -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() }