bugfix: static in check_frame_sync
This commit is contained in:
parent
d3719bd11c
commit
2d52d95a0a
|
@ -6,7 +6,7 @@
|
||||||
|
|
||||||
static inline bool check_frame_sync(uint64_t x, int err_threshold, int len) {
|
static inline bool check_frame_sync(uint64_t x, int err_threshold, int len) {
|
||||||
int errs=0;
|
int errs=0;
|
||||||
static const uint64_t mask = (1LL<<len)-1;
|
const uint64_t mask = (1LL<<len)-1LL;
|
||||||
x = x & mask;
|
x = x & mask;
|
||||||
// source: https://en.wikipedia.org/wiki/Hamming_weight
|
// source: https://en.wikipedia.org/wiki/Hamming_weight
|
||||||
static const uint64_t m1 = 0x5555555555555555; //binary: 0101...
|
static const uint64_t m1 = 0x5555555555555555; //binary: 0101...
|
||||||
|
|
Loading…
Reference in New Issue