summaryrefslogtreecommitdiff
path: root/bits.c
diff options
context:
space:
mode:
authorEric S. Raymond <esr@thyrsus.com>2009-03-18 17:37:53 +0000
committerEric S. Raymond <esr@thyrsus.com>2009-03-18 17:37:53 +0000
commit91cd827bc5b4eeb70c6597c3d28c7c841f34cffc (patch)
treefc374b705996a0d9a742338f6c9ebc713606f0a3 /bits.c
parent1df47c95095d80d8b386d6584d6396bff7e187da (diff)
downloadgpsd-91cd827bc5b4eeb70c6597c3d28c7c841f34cffc.tar.gz
splint cleanup.
Diffstat (limited to 'bits.c')
-rw-r--r--bits.c4
1 files changed, 4 insertions, 0 deletions
diff --git a/bits.c b/bits.c
index bd807348..3468e40f 100644
--- a/bits.c
+++ b/bits.c
@@ -49,7 +49,9 @@ unsigned long long ubits(char buf[], unsigned int start, unsigned int width)
(void)printf(" = %lld\n", fld);
#endif /* UDEBUG */
+ /*@ -shiftimplementation @*/
fld &= ~(-1LL << width);
+ /*@ +shiftimplementation @*/
#ifdef DEBUG
(void)printf(" after selecting out the bottom %u bits: 0x%llx = %lld\n",
width, fld, fld);
@@ -71,7 +73,9 @@ signed long long sbits(char buf[], unsigned int start, unsigned int width)
#ifdef SDEBUG
(void)fprintf(stderr, "%llx is signed\n", fld);
#endif /* SDEBUG */
+ /*@ -shiftimplementation @*/
fld |= (-1LL << (width-1));
+ /*@ +shiftimplementation @*/
}
#ifdef SDEBUG
(void)fprintf(stderr, "sbits(%d, %d) returns %lld\n", start, width, (signed long long)fld);