mraa.c: fix unsigned int comparison by usign UINT_MAX instead of -1
This works since both are essentially 'impossible' values. Signed-off-by: Brendan Le Foll <brendan.le.foll@intel.com>
This commit is contained in:
@@ -294,7 +294,8 @@ mraa_setup_mux_mapped(mraa_pin_t meta)
|
|||||||
unsigned int mi;
|
unsigned int mi;
|
||||||
mraa_result_t ret;
|
mraa_result_t ret;
|
||||||
mraa_gpio_context mux_i = NULL;
|
mraa_gpio_context mux_i = NULL;
|
||||||
int last_pin = -1;
|
// avoids the unsigned comparison and we should never have a pin that is UINT_MAX!
|
||||||
|
unsigned int last_pin = UINT_MAX;
|
||||||
|
|
||||||
for (mi = 0; mi < meta.mux_total; mi++) {
|
for (mi = 0; mi < meta.mux_total; mi++) {
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user