if (dev->idVendor == 0xfffe && dev->tty) {
if (devs->dev)
devs->dev = realloc(devs->dev,
- devs->ndev + 1 * sizeof (struct usbdev *));
+ (devs->ndev + 1) * sizeof (struct usbdev *));
else
devs->dev = malloc (sizeof (struct usbdev *));
devs->dev[devs->ndev++] = dev;
return NULL;
for (i = 0; i < devs->ndev; i++) {
dev = devs->dev[i];
- if (product && strcmp (product, dev->product) != 0)
+ if (product && strncmp (product, dev->product, strlen(product)) != 0)
continue;
if (serial && serial != dev->serial)
continue;