diff options
author | Eric S. Raymond <esr@thyrsus.com> | 2015-03-28 19:02:23 -0400 |
---|---|---|
committer | Eric S. Raymond <esr@thyrsus.com> | 2015-03-28 19:02:23 -0400 |
commit | 009ba6e3452df29cbf1757bc0c79dc14683a98da (patch) | |
tree | 4775cfa65e817c69a6f29a0ac87daab8701c7ae2 /bits.c | |
parent | 5f710d3469c8da31014000ac13664fe92c57757d (diff) | |
download | gpsd-009ba6e3452df29cbf1757bc0c79dc14683a98da.tar.gz |
Clean up most spint errors. All regression tests pass.
Diffstat (limited to 'bits.c')
-rw-r--r-- | bits.c | 6 |
1 files changed, 3 insertions, 3 deletions
@@ -25,16 +25,16 @@ uint64_t ubits(unsigned char buf[], unsigned int start, unsigned int width, bool unsigned int i; unsigned end; - assert(width <= sizeof(uint64_t) * CHAR_BIT); + /*@i1@*/ assert(width <= sizeof(uint64_t) * CHAR_BIT); for (i = start / CHAR_BIT; i < (start + width + CHAR_BIT - 1) / CHAR_BIT; i++) { - fld <<= CHAR_BIT; + /*@i1@*/ fld <<= CHAR_BIT; fld |= (unsigned char)buf[i]; } end = (start + width) % CHAR_BIT; if (end != 0) { - fld >>= (CHAR_BIT - end); + /*@i1@*/ fld >>= (CHAR_BIT - end); } /*@ -shiftimplementation @*/ |