Use uint8_t for comparisons to avoid int conversions
authorKeith Packard <keithp@keithp.com>
Sat, 18 Jul 2009 04:33:18 +0000 (21:33 -0700)
committerKeith Packard <keithp@keithp.com>
Sat, 18 Jul 2009 04:33:18 +0000 (21:33 -0700)
Signed-off-by: Keith Packard <keithp@keithp.com>
src/ao_gps.c

index 32a44fb1b24ca8f52c56e132b403633ec5fb3923..78957cb386dc6aeff05f2f19af1971128ff1a0d1 100644 (file)
@@ -289,9 +289,9 @@ ao_gps(void) __reentrant
        }
        for (;;) {
                /* Locate the begining of the next record */
        }
        for (;;) {
                /* Locate the begining of the next record */
-               while (ao_sirf_byte() != 0xa0)
+               while (ao_sirf_byte() != (uint8_t) 0xa0)
                        ;
                        ;
-               if (ao_sirf_byte() != 0xa2)
+               if (ao_sirf_byte() != (uint8_t) 0xa2)
                        continue;
 
                /* Length */
                        continue;
 
                /* Length */
@@ -321,9 +321,9 @@ ao_gps(void) __reentrant
                cksum |= ao_sirf_byte();
                if (ao_sirf_cksum != cksum)
                        continue;
                cksum |= ao_sirf_byte();
                if (ao_sirf_cksum != cksum)
                        continue;
-               if (ao_sirf_byte() != 0xb0)
+               if (ao_sirf_byte() != (uint8_t) 0xb0)
                        continue;
                        continue;
-               if (ao_sirf_byte() != 0xb3)
+               if (ao_sirf_byte() != (uint8_t) 0xb3)
                        continue;
 
                switch (i) {
                        continue;
 
                switch (i) {