altos: unsigned value in ao_pyro_set checked for negative value
authorKeith Packard <keithp@keithp.com>
Sat, 21 Dec 2013 06:44:20 +0000 (22:44 -0800)
committerKeith Packard <keithp@keithp.com>
Sat, 21 Dec 2013 06:44:20 +0000 (22:44 -0800)
No sense checking unsigned values for less than zero.

Signed-off-by: Keith Packard <keithp@keithp.com>
src/core/ao_pyro.c

index a260aa99f332cbaf7324e7e63f67956fb241719c..e59f5bc4bdbf8881ab1c88a1970127ae687604bc 100644 (file)
@@ -436,7 +436,7 @@ ao_pyro_set(void)
        if (ao_cmd_status != ao_cmd_success)
                return;
        p = ao_cmd_lex_i;
        if (ao_cmd_status != ao_cmd_success)
                return;
        p = ao_cmd_lex_i;
-       if (p < 0 || AO_PYRO_NUM <= p) {
+       if (AO_PYRO_NUM <= p) {
                printf ("invalid pyro channel %d\n", p);
                return;
        }
                printf ("invalid pyro channel %d\n", p);
                return;
        }