summaryrefslogtreecommitdiff
path: root/src/class/hid
diff options
context:
space:
mode:
authorhathach <[email protected]>2023-02-27 09:11:35 +0700
committerhathach <[email protected]>2023-02-27 09:11:35 +0700
commite34aeb5cf69315d2d7711f0a1d040a28492d026d (patch)
tree823a987b9dae178c1261b3ab5050389c0f44a852 /src/class/hid
parent2e47210c1af88b88b6f2d92fe2b6d08117041363 (diff)
minor clean up
Diffstat (limited to 'src/class/hid')
-rw-r--r--src/class/hid/hid_device.c6
1 files changed, 3 insertions, 3 deletions
diff --git a/src/class/hid/hid_device.c b/src/class/hid/hid_device.c
index 40654eef9..37a22b609 100644
--- a/src/class/hid/hid_device.c
+++ b/src/class/hid/hid_device.c
@@ -93,11 +93,11 @@ bool tud_hid_n_report(uint8_t instance, uint8_t report_id, void const* report, u
if (report_id)
{
p_hid->epin_buf[0] = report_id;
- TU_VERIFY(tu_memcpy_s(p_hid->epin_buf+1, CFG_TUD_HID_EP_BUFSIZE-1, report, len)==0);
+ TU_VERIFY(0 == tu_memcpy_s(p_hid->epin_buf+1, CFG_TUD_HID_EP_BUFSIZE-1, report, len));
len++;
}else
{
- TU_VERIFY(tu_memcpy_s(p_hid->epin_buf, CFG_TUD_HID_EP_BUFSIZE, report, len)==0);
+ TU_VERIFY(0 == tu_memcpy_s(p_hid->epin_buf, CFG_TUD_HID_EP_BUFSIZE, report, len));
}
return usbd_edpt_xfer(rhport, p_hid->ep_in, p_hid->epin_buf, len);
@@ -122,7 +122,7 @@ bool tud_hid_n_keyboard_report(uint8_t instance, uint8_t report_id, uint8_t modi
if ( keycode )
{
- TU_VERIFY(tu_memcpy_s(report.keycode, sizeof(report.keycode), keycode, sizeof(report.keycode))==0);
+ memcpy(report.keycode, keycode, sizeof(report.keycode));
}else
{
tu_memclr(report.keycode, 6);