projects
/
fw
/
altos
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
| inline |
side by side
altos: sdcc doesn't have 'false' and 'true'.
[fw/altos]
/
ao-tools
/
lib
/
cc-usb.c
diff --git
a/ao-tools/lib/cc-usb.c
b/ao-tools/lib/cc-usb.c
index 1a4dc7a1163f7460bdf139422be70d72ed44d35c..1e023c7ebe8f7b37e99eeef7b044d294a5f531dd 100644
(file)
--- a/
ao-tools/lib/cc-usb.c
+++ b/
ao-tools/lib/cc-usb.c
@@
-207,8
+207,10
@@
_cc_usb_sync(struct cc_usb *cc, int wait_for_input, int write_timeout)
write(2, cc->in_buf, cc->in_count);
cc->in_count = 0;
}
- } else if (ret <
0)
+ } else if (ret <
= 0) {
perror("read");
+ return -1;
+ }
}
if (fds.revents & POLLOUT) {
ret = write(cc->fd, cc->out_buf,