summaryrefslogtreecommitdiff
path: root/src/usbh_driver_hid.c
diff options
context:
space:
mode:
authorAmir Hammad <amir.hammad@hotmail.com>2016-09-08 06:27:35 +0200
committerAmir Hammad <amir.hammad@hotmail.com>2016-09-11 13:31:47 +0200
commit1d1b697bc6b13b5db1594c3dafe5452b6b2c1668 (patch)
tree5bf0ea2ffbf6536ce67d3e5b26d2b65e7c6a69ce /src/usbh_driver_hid.c
parentbc8dd60b2ebc311427c751937df464ba58b12c42 (diff)
downloadsecure-hid-1d1b697bc6b13b5db1594c3dafe5452b6b2c1668.tar.gz
secure-hid-1d1b697bc6b13b5db1594c3dafe5452b6b2c1668.tar.bz2
secure-hid-1d1b697bc6b13b5db1594c3dafe5452b6b2c1668.zip
use NULL instead of 0 for assigning null pointer
Signed-off-by: Amir Hammad <amir.hammad@hotmail.com>
Diffstat (limited to 'src/usbh_driver_hid.c')
-rw-r--r--src/usbh_driver_hid.c3
1 files changed, 2 insertions, 1 deletions
diff --git a/src/usbh_driver_hid.c b/src/usbh_driver_hid.c
index 54956b2..0e90ab0 100644
--- a/src/usbh_driver_hid.c
+++ b/src/usbh_driver_hid.c
@@ -28,6 +28,7 @@
#include <libopencm3/usb/usbstd.h>
#include <libopencm3/usb/hid.h>
#include <stdint.h>
+#include <stddef.h>
#define USB_HID_SET_REPORT 0x09
#define USB_HID_SET_IDLE 0x0A
@@ -100,7 +101,7 @@ static void *init(void *usbh_dev)
}
uint32_t i;
- hid_device_t *drvdata = 0;
+ hid_device_t *drvdata = NULL;
// find free data space for HID device
for (i = 0; i < USBH_HID_MAX_DEVICES; i++) {