From: Keith Packard Date: Sat, 18 Jul 2009 04:33:18 +0000 (-0700) Subject: Use uint8_t for comparisons to avoid int conversions X-Git-Tag: 0.5~26 X-Git-Url: https://git.gag.com/?p=fw%2Faltos;a=commitdiff_plain;h=ab40d224b39ba6d29c4056e2d2c365e1eb3d3793;ds=sidebyside Use uint8_t for comparisons to avoid int conversions Signed-off-by: Keith Packard --- diff --git a/src/ao_gps.c b/src/ao_gps.c index 32a44fb1..78957cb3 100644 --- a/src/ao_gps.c +++ b/src/ao_gps.c @@ -289,9 +289,9 @@ ao_gps(void) __reentrant } 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 */ @@ -321,9 +321,9 @@ ao_gps(void) __reentrant cksum |= ao_sirf_byte(); if (ao_sirf_cksum != cksum) continue; - if (ao_sirf_byte() != 0xb0) + if (ao_sirf_byte() != (uint8_t) 0xb0) continue; - if (ao_sirf_byte() != 0xb3) + if (ao_sirf_byte() != (uint8_t) 0xb3) continue; switch (i) {