Skip to content

Commit 4c90cf4

Browse files
deadprogramaykevl
authored andcommitted
sd: replace unsafe.SliceData call with expression that is still supported in older Go versions
Signed-off-by: deadprogram <[email protected]>
1 parent bf647ec commit 4c90cf4

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

gatts_sd.go

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -150,7 +150,7 @@ func (c *Characteristic) Write(p []byte) (n int, err error) {
150150
}
151151
}
152152

153-
errCode := C.sd_ble_gatts_value_set_noescape(C.BLE_CONN_HANDLE_INVALID, c.handle, C.uint16_t(len(p)), unsafe.SliceData(p))
153+
errCode := C.sd_ble_gatts_value_set_noescape(C.BLE_CONN_HANDLE_INVALID, c.handle, C.uint16_t(len(p)), (*C.uint8_t)(unsafe.Pointer(&p[0])))
154154
if errCode != 0 {
155155
return 0, Error(errCode)
156156
}

0 commit comments

Comments
 (0)