Private
Public Access
2
0

firmata_mraa.c: retry counter should not be decremented past 0

This means the retry counter works appropriately in case of failure. Closes #574

Signed-off-by: Brendan Le Foll <brendan.le.foll@intel.com>
This commit is contained in:
Brendan Le Foll
2016-09-02 11:48:51 +01:00
parent 9bc91f4b12
commit bf2a504774

View File

@@ -537,7 +537,7 @@ mraa_firmata_plat_init(const char* uart_dev)
// if this isn't working then we have an issue with our uart
int retry = 20;
while (!firmata_dev->isReady && retry--) {
while (!firmata_dev->isReady && --retry) {
firmata_pull(firmata_dev);
}