projects
/
fw
/
altos
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
|
inline
| side by side
get ready for a 1.0.1 release
[fw/altos]
/
ao-tools
/
lib
/
cc-usbdev.c
diff --git
a/ao-tools/lib/cc-usbdev.c
b/ao-tools/lib/cc-usbdev.c
index ed39c0628c955deb5c1d28bd528ad842e5590745..a19e231c9fe724cd4b473d6f7ca3c6037acdd850 100644
(file)
--- a/
ao-tools/lib/cc-usbdev.c
+++ b/
ao-tools/lib/cc-usbdev.c
@@
-223,7
+223,7
@@
cc_usbdevs_scan(void)
if (dev->idVendor == 0xfffe && dev->tty) {
if (devs->dev)
devs->dev = realloc(devs->dev,
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;
else
devs->dev = malloc (sizeof (struct usbdev *));
devs->dev[devs->ndev++] = dev;
@@
-258,7
+258,7
@@
match_dev(char *product, int serial)
return NULL;
for (i = 0; i < devs->ndev; i++) {
dev = devs->dev[i];
return NULL;
for (i = 0; i < devs->ndev; i++) {
dev = devs->dev[i];
- if (product && str
cmp (product, dev->product
) != 0)
+ if (product && str
ncmp (product, dev->product, strlen(product)
) != 0)
continue;
if (serial && serial != dev->serial)
continue;
continue;
if (serial && serial != dev->serial)
continue;