aboutsummaryrefslogtreecommitdiff
path: root/lib
diff options
context:
space:
mode:
Diffstat (limited to 'lib')
-rw-r--r--lib/libusb/libusb20.c4
-rw-r--r--lib/libusbhid/descr.c2
-rw-r--r--lib/libusbhid/usage.c6
3 files changed, 6 insertions, 6 deletions
diff --git a/lib/libusb/libusb20.c b/lib/libusb/libusb20.c
index 1de3a265125a..2eb75f1c6d7c 100644
--- a/lib/libusb/libusb20.c
+++ b/lib/libusb/libusb20.c
@@ -139,8 +139,8 @@ libusb20_tr_close(struct libusb20_transfer *xfer)
free(xfer->ppBuffer);
}
/* reset variable fields in case the transfer is opened again */
- xfer->priv_sc0 = 0;
- xfer->priv_sc1 = 0;
+ xfer->priv_sc0 = NULL;
+ xfer->priv_sc1 = NULL;
xfer->is_opened = 0;
xfer->is_pending = 0;
xfer->is_cancel = 0;
diff --git a/lib/libusbhid/descr.c b/lib/libusbhid/descr.c
index 0c6634236635..4ca9dd795d09 100644
--- a/lib/libusbhid/descr.c
+++ b/lib/libusbhid/descr.c
@@ -159,7 +159,7 @@ hid_use_report_desc(unsigned char *data, unsigned int size)
report_desc_t r;
r = malloc(sizeof(*r) + size);
- if (r == 0) {
+ if (r == NULL) {
errno = ENOMEM;
return (NULL);
}
diff --git a/lib/libusbhid/usage.c b/lib/libusbhid/usage.c
index eeff818afed8..3960dad8076a 100644
--- a/lib/libusbhid/usage.c
+++ b/lib/libusbhid/usage.c
@@ -77,9 +77,9 @@ hid_init(const char *hidname)
char line[100], name[100], *p, *n;
int no;
int lineno;
- struct usage_page *curpage = 0;
+ struct usage_page *curpage = NULL;
- if (hidname == 0)
+ if (hidname == NULL)
hidname = _PATH_HIDTABLE;
f = fopen(hidname, "r");
@@ -124,7 +124,7 @@ hid_init(const char *hidname)
curpage->pagesize++;
} else {
if (npages >= npagesmax) {
- if (pages == 0) {
+ if (pages == NULL) {
npagesmax = 5;
pages = malloc(npagesmax *
sizeof (struct usage_page));