summaryrefslogtreecommitdiffstats
path: root/buspirate_spi.c
diff options
context:
space:
mode:
Diffstat (limited to 'buspirate_spi.c')
-rw-r--r--buspirate_spi.c3
1 files changed, 2 insertions, 1 deletions
diff --git a/buspirate_spi.c b/buspirate_spi.c
index a556185..fd06b59 100644
--- a/buspirate_spi.c
+++ b/buspirate_spi.c
@@ -295,7 +295,8 @@ static int buspirate_spi_send_command(unsigned int writecnt, unsigned int readcn
const unsigned char *writearr, unsigned char *readarr)
{
static unsigned char *buf = NULL;
- int i = 0, ret = 0;
+ unsigned int i = 0;
+ int ret = 0;
if (writecnt > 16 || readcnt > 16 || (readcnt + writecnt) > 16)
return SPI_INVALID_LENGTH;
OpenPOWER on IntegriCloud