summaryrefslogtreecommitdiff
path: root/lib/libusb
diff options
context:
space:
mode:
authorlukem <lukem@NetBSD.org>1999-09-20 04:38:56 +0000
committerlukem <lukem@NetBSD.org>1999-09-20 04:38:56 +0000
commitd896261208b4610b0c4e86ea95caad3cdc86a4ac (patch)
tree9a96db945c9ffba191e3aa4d741cf5d30fbd30f2 /lib/libusb
parentf6ae64deff8e64a1acb3e1536bf6b6d06f7bffb9 (diff)
back out the #ifdef _DIAGNOSTIC argument checks; too many people complained.
_DIAGASSERT() is still retained.
Diffstat (limited to 'lib/libusb')
-rw-r--r--lib/libusb/data.c10
-rw-r--r--lib/libusb/descr.c8
-rw-r--r--lib/libusb/parse.c22
3 files changed, 3 insertions, 37 deletions
diff --git a/lib/libusb/data.c b/lib/libusb/data.c
index aa29f6382e6..127482b9b75 100644
--- a/lib/libusb/data.c
+++ b/lib/libusb/data.c
@@ -1,4 +1,4 @@
-/* $NetBSD: data.c,v 1.5 1999/09/16 11:45:50 lukem Exp $ */
+/* $NetBSD: data.c,v 1.6 1999/09/20 04:48:12 lukem Exp $ */
/*
* Copyright (c) 1999 Lennart Augustsson <augustss@netbsd.org>
@@ -41,10 +41,6 @@ hid_get_data(void *p, hid_item_t *h)
_DIAGASSERT(p != NULL);
_DIAGASSERT(h != NULL);
-#ifdef _DIAGNOSTIC
- if (p == NULL || h == NULL)
- return (0);
-#endif
buf = p;
hpos = h->pos; /* bit position of data */
@@ -77,10 +73,6 @@ hid_set_data(void *p, hid_item_t *h, int data)
_DIAGASSERT(p != NULL);
_DIAGASSERT(h != NULL);
-#ifdef _DIAGNOSTIC
- if (p == NULL || h == NULL)
- return;
-#endif
buf = p;
hpos = h->pos; /* bit position of data */
diff --git a/lib/libusb/descr.c b/lib/libusb/descr.c
index e636c446008..db1bb5f1657 100644
--- a/lib/libusb/descr.c
+++ b/lib/libusb/descr.c
@@ -1,4 +1,4 @@
-/* $NetBSD: descr.c,v 1.5 1999/09/16 11:45:50 lukem Exp $ */
+/* $NetBSD: descr.c,v 1.6 1999/09/20 04:48:12 lukem Exp $ */
/*
* Copyright (c) 1999 Lennart Augustsson <augustss@netbsd.org>
@@ -47,12 +47,6 @@ hid_get_report_desc(fd)
report_desc_t r;
_DIAGASSERT(fd != -1);
-#ifdef _DIAGNOSTIC
- if (fd == -1) {
- errno = EBADF;
- return (0);
- }
-#endif
rep.size = 0;
if (ioctl(fd, USB_GET_REPORT_DESC, &rep) < 0)
diff --git a/lib/libusb/parse.c b/lib/libusb/parse.c
index ed9d89473bb..dae75b1c5f8 100644
--- a/lib/libusb/parse.c
+++ b/lib/libusb/parse.c
@@ -1,4 +1,4 @@
-/* $NetBSD: parse.c,v 1.5 1999/09/16 11:45:50 lukem Exp $ */
+/* $NetBSD: parse.c,v 1.6 1999/09/20 04:48:12 lukem Exp $ */
/*
* Copyright (c) 1999 Lennart Augustsson <augustss@netbsd.org>
@@ -76,10 +76,6 @@ hid_start_parse(report_desc_t d, int kindset)
struct hid_data *s;
_DIAGASSERT(d != NULL);
-#ifdef _DIAGNOSTIC
- if (d == NULL)
- return (0);
-#endif
s = malloc(sizeof *s);
memset(s, 0, sizeof *s);
@@ -94,10 +90,6 @@ hid_end_parse(hid_data_t s)
{
_DIAGASSERT(s != NULL);
-#ifdef _DIAGNOSTIC
- if (s == NULL)
- return;
-#endif
while (s->cur.next) {
hid_item_t *hi = s->cur.next->next;
@@ -120,10 +112,6 @@ hid_get_item(hid_data_t s, hid_item_t *h)
_DIAGASSERT(s != NULL);
_DIAGASSERT(h != NULL);
-#ifdef _DIAGNOSTIC
- if (s == NULL || h == NULL)
- return (-1);
-#endif
c = &s->cur;
@@ -369,10 +357,6 @@ hid_report_size(report_desc_t r, enum hid_kind k, int *idp)
_DIAGASSERT(r != NULL);
/* idp may be NULL */
-#ifdef _DIAGNOSTIC
- if (r == NULL)
- return (0);
-#endif
id = 0;
if (idp)
@@ -401,10 +385,6 @@ hid_locate(desc, u, k, h)
_DIAGASSERT(desc != NULL);
_DIAGASSERT(h != NULL);
-#ifdef _DIAGNOSTIC
- if (desc == NULL || h == NULL)
- return (0);
-#endif
for (d = hid_start_parse(desc, 1<<k); hid_get_item(d, h); ) {
if (h->kind == k && !(h->flags & HIO_CONST) && h->usage == u) {