diff options
author | n_hibma <n_hibma@FreeBSD.org> | 2000-07-07 08:15:19 +0000 |
---|---|---|
committer | n_hibma <n_hibma@FreeBSD.org> | 2000-07-07 08:15:19 +0000 |
commit | 7b59eeb53d28ebccd6fc99bcd16962a1ee301e5c (patch) | |
tree | 9043703a72b22281ea8d68168fbdff628eb8a334 | |
parent | 9520faa8177063b9de5888cad6ec4a55a03f0a1c (diff) | |
download | FreeBSD-src-7b59eeb53d28ebccd6fc99bcd16962a1ee301e5c.zip FreeBSD-src-7b59eeb53d28ebccd6fc99bcd16962a1ee301e5c.tar.gz |
Remove DIAGASSERT
-rw-r--r-- | lib/libusb/data.c | 6 | ||||
-rw-r--r-- | lib/libusb/descr.c | 2 | ||||
-rw-r--r-- | lib/libusb/parse.c | 17 | ||||
-rw-r--r-- | lib/libusbhid/data.c | 6 | ||||
-rw-r--r-- | lib/libusbhid/descr.c | 2 | ||||
-rw-r--r-- | lib/libusbhid/parse.c | 17 |
6 files changed, 0 insertions, 50 deletions
diff --git a/lib/libusb/data.c b/lib/libusb/data.c index 26b33b3..c850ba8 100644 --- a/lib/libusb/data.c +++ b/lib/libusb/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/libusb/descr.c b/lib/libusb/descr.c index 17b607e..8904a87 100644 --- a/lib/libusb/descr.c +++ b/lib/libusb/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/libusb/parse.c b/lib/libusb/parse.c index 79af687..f021762 100644 --- a/lib/libusb/parse.c +++ b/lib/libusb/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); 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); |