Skip to content

Commit

Permalink
Fix for warning about comparison of signed and unsigned int.
Browse files Browse the repository at this point in the history
  • Loading branch information
njh committed Dec 31, 2011
1 parent 625911f commit 899e03e
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions NanodeUNIO.cpp
Expand Up @@ -125,7 +125,7 @@ static boolean read_byte(byte *b, boolean mak) {
/* Send data on the bus. If end is true, send NoMAK after the last
byte; otherwise send MAK. */
static boolean unio_send(const byte *data,word length,boolean end) {
for (int i=0; i<length; i++) {
for (word i=0; i<length; i++) {
/* Rules for sending MAK: if it's the last byte and end is true,
send NoMAK. Otherwise send MAK. */
if (!send_byte(data[i],!(((i+1)==length) && end))) return false;
Expand All @@ -136,7 +136,7 @@ static boolean unio_send(const byte *data,word length,boolean end) {
/* Read data from the bus. After reading 'length' bytes, send NoMAK to
terminate the command. */
static boolean unio_read(byte *data,word length) {
for (int i=0; i<length; i++) {
for (word i=0; i<length; i++) {
if (!read_byte(data+i,!((i+1)==length))) return false;
}
return true;
Expand Down

0 comments on commit 899e03e

Please sign in to comment.