d/opengloves: Use correct argument when casting

This commit is contained in:
Jakob Bornecrantz 2022-08-10 12:53:00 +01:00 committed by Moses Turner
parent 3485babd71
commit 42f5cf4c9d

View file

@ -43,7 +43,7 @@ opengloves_bt_read(struct opengloves_communication_device *ocdev, char *data, si
static int
opengloves_bt_write(struct opengloves_communication_device *ocdev, const uint8_t *data, size_t length)
{
struct opengloves_bt_device *obdev = (struct opengloves_bt_device *)obdev;
struct opengloves_bt_device *obdev = (struct opengloves_bt_device *)ocdev;
return write(obdev->sock, data, length);
}
@ -51,14 +51,12 @@ opengloves_bt_write(struct opengloves_communication_device *ocdev, const uint8_t
static void
opengloves_bt_destroy(struct opengloves_communication_device *ocdev)
{
struct opengloves_bt_device *obdev = (struct opengloves_bt_device *)obdev;
struct opengloves_bt_device *obdev = (struct opengloves_bt_device *)ocdev;
opengloves_bt_close(obdev);
free(obdev);
}
int
opengloves_bt_open(const char *btaddr, struct opengloves_communication_device **out_comm_dev)
{