summaryrefslogtreecommitdiff
path: root/bits.c
diff options
context:
space:
mode:
authorEric S. Raymond <esr@thyrsus.com>2009-03-27 00:04:13 +0000
committerEric S. Raymond <esr@thyrsus.com>2009-03-27 00:04:13 +0000
commit42a670b9883a73ffd1f50149c9a95cabc13eccce (patch)
treef45e0b0285a31d9f50f1c3338398b764c7c51050 /bits.c
parentc5c2ae57fc8901e28824000d8e8cd924356a9e3d (diff)
downloadgpsd-42a670b9883a73ffd1f50149c9a95cabc13eccce.tar.gz
Improved documentation and regression testing for the bitfield extractor.
Diffstat (limited to 'bits.c')
-rw-r--r--bits.c4
1 files changed, 2 insertions, 2 deletions
diff --git a/bits.c b/bits.c
index 3468e40f..de0bf7a2 100644
--- a/bits.c
+++ b/bits.c
@@ -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;