summaryrefslogtreecommitdiffstats
path: root/lib/libusbhid
diff options
context:
space:
mode:
authorn_hibma <n_hibma@FreeBSD.org>2000-07-07 08:15:19 +0000
committern_hibma <n_hibma@FreeBSD.org>2000-07-07 08:15:19 +0000
commit7b59eeb53d28ebccd6fc99bcd16962a1ee301e5c (patch)
tree9043703a72b22281ea8d68168fbdff628eb8a334 /lib/libusbhid
parent9520faa8177063b9de5888cad6ec4a55a03f0a1c (diff)
downloadFreeBSD-src-7b59eeb53d28ebccd6fc99bcd16962a1ee301e5c.zip
FreeBSD-src-7b59eeb53d28ebccd6fc99bcd16962a1ee301e5c.tar.gz
Remove DIAGASSERT
Diffstat (limited to 'lib/libusbhid')
-rw-r--r--lib/libusbhid/data.c6
-rw-r--r--lib/libusbhid/descr.c2
-rw-r--r--lib/libusbhid/parse.c17
3 files changed, 0 insertions, 25 deletions
diff --git a/lib/libusbhid/data.c b/lib/libusbhid/data.c
index 26b33b3..c850ba8 100644
--- a/lib/libusbhid/data.c
+++ b/lib/libusbhid/data.c
@@ -41,9 +41,6 @@ hid_get_data(const void *p, const hid_item_t *h)
int data;
int i, end, offs;
- _DIAGASSERT(p != NULL);
- _DIAGASSERT(h != NULL);
-
buf = p;
hpos = h->pos; /* bit position of data */
hsize = h->report_size; /* bit length of data */
@@ -73,9 +70,6 @@ hid_set_data(void *p, const hid_item_t *h, int data)
unsigned int hsize;
int i, end, offs, mask;
- _DIAGASSERT(p != NULL);
- _DIAGASSERT(h != NULL);
-
buf = p;
hpos = h->pos; /* bit position of data */
hsize = h->report_size; /* bit length of data */
diff --git a/lib/libusbhid/descr.c b/lib/libusbhid/descr.c
index 17b607e..8904a87 100644
--- a/lib/libusbhid/descr.c
+++ b/lib/libusbhid/descr.c
@@ -51,8 +51,6 @@ hid_get_report_desc(fd)
struct usb_ctl_report_desc rep;
report_desc_t r;
- _DIAGASSERT(fd != -1);
-
rep.size = 0;
if (ioctl(fd, USB_GET_REPORT_DESC, &rep) < 0)
return (0);
diff --git a/lib/libusbhid/parse.c b/lib/libusbhid/parse.c
index 79af687..f021762 100644
--- a/lib/libusbhid/parse.c
+++ b/lib/libusbhid/parse.c
@@ -59,9 +59,6 @@ static int min(int x, int y) { return x < y ? x : y; }
static void
hid_clear_local(hid_item_t *c)
{
-
- _DIAGASSERT(c != NULL);
-
c->usage = 0;
c->usage_minimum = 0;
c->usage_maximum = 0;
@@ -79,8 +76,6 @@ hid_start_parse(report_desc_t d, int kindset)
{
struct hid_data *s;
- _DIAGASSERT(d != NULL);
-
s = malloc(sizeof *s);
memset(s, 0, sizeof *s);
s->start = s->p = d->data;
@@ -92,9 +87,6 @@ hid_start_parse(report_desc_t d, int kindset)
void
hid_end_parse(hid_data_t s)
{
-
- _DIAGASSERT(s != NULL);
-
while (s->cur.next) {
hid_item_t *hi = s->cur.next->next;
free(s->cur.next);
@@ -114,9 +106,6 @@ hid_get_item(hid_data_t s, hid_item_t *h)
hid_item_t *hi;
int i;
- _DIAGASSERT(s != NULL);
- _DIAGASSERT(h != NULL);
-
c = &s->cur;
top:
@@ -362,9 +351,6 @@ hid_report_size(report_desc_t r, enum hid_kind k, int *idp)
hid_item_t h;
int size, id;
- _DIAGASSERT(r != NULL);
- /* idp may be NULL */
-
id = 0;
if (idp)
*idp = 0;
@@ -390,9 +376,6 @@ hid_locate(desc, u, k, h)
{
hid_data_t d;
- _DIAGASSERT(desc != NULL);
- _DIAGASSERT(h != NULL);
-
for (d = hid_start_parse(desc, 1<<k); hid_get_item(d, h); ) {
if (h->kind == k && !(h->flags & HIO_CONST) && h->usage == u) {
hid_end_parse(d);
OpenPOWER on IntegriCloud