Date: Mon, 21 Sep 2009 15:38:46 -0700 From: Trevor Blackwell <tlb@tlb.org> To: freebsd-usb@freebsd.org Subject: libusb20 api Message-ID: <2C0D6269-1296-4D34-8029-828A0FE281CB@tlb.org>
next in thread | raw e-mail | index | archive | help
This always fails: char devname[256]; if (libusb20_dev_get_iface_desc(pdev, n, devname, sizeof(devname))) break; while this works: char devname[128]; if (libusb20_dev_get_iface_desc(pdev, n, devname, sizeof(devname))) break; Because this function takes a uint8_t for length: <libusb20_ugen20.c:851>: static int ugen20_dev_get_iface_desc(struct libusb20_device *pdev, uint8_t iface_index, char *buf, uint8_t len) even though the kernel ioctl structure has a 16-bit length. Hans, why not just use size_t for such arguments? -- Trevor Blackwell 650 776 7870 tlb@tlb.org
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?2C0D6269-1296-4D34-8029-828A0FE281CB>