diff options
author | Eric S. Raymond <esr@thyrsus.com> | 2009-03-27 00:04:13 +0000 |
---|---|---|
committer | Eric S. Raymond <esr@thyrsus.com> | 2009-03-27 00:04:13 +0000 |
commit | 42a670b9883a73ffd1f50149c9a95cabc13eccce (patch) | |
tree | f45e0b0285a31d9f50f1c3338398b764c7c51050 /bits.c | |
parent | c5c2ae57fc8901e28824000d8e8cd924356a9e3d (diff) | |
download | gpsd-42a670b9883a73ffd1f50149c9a95cabc13eccce.tar.gz |
Improved documentation and regression testing for the bitfield extractor.
Diffstat (limited to 'bits.c')
-rw-r--r-- | bits.c | 4 |
1 files changed, 2 insertions, 2 deletions
@@ -2,7 +2,7 @@ /* * Bitfield extraction functions. In each, start is a bit index (not * a byte index) and width is a bit width. The width bounded above by - * the bit width of a long long, which s 64 bits in all standard data + * the bit width of a long long, which is 64 bits in all standard data * models for 32- and 64-bit processors. * * The sbits() function assumes twos-complement arithmetic. @@ -19,7 +19,7 @@ #define BITS_PER_BYTE 8 unsigned long long ubits(char buf[], unsigned int start, unsigned int width) -/* extract a bitfield from the buffer as an unsigned big-endian long long */ +/* extract a (zero-origin) bitfield from the buffer as an unsigned big-endian long long */ { unsigned long long fld = 0; unsigned int i; |