summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorClaudiu-Vlad Ursache <[email protected]>2014-01-26 12:36:05 +0100
committerClaudiu-Vlad Ursache <[email protected]>2014-01-26 12:36:05 +0100
commitbf209ca2ba293116bdd3062ba9ff5ac071f9ddd5 (patch)
tree197dd2693a022878d8639a28c1bb37ce772da9ea
parent53f2ebce5f5124eff6b8e0ac2c45651d043899fa (diff)
Remove unnecessary cast.
-rw-r--r--odb.go4
1 files 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()
}