diff options
Diffstat (limited to 'src/helper/binarybuffer.h')
-rw-r--r-- | src/helper/binarybuffer.h | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/src/helper/binarybuffer.h b/src/helper/binarybuffer.h index dede72d5..4b8830b2 100644 --- a/src/helper/binarybuffer.h +++ b/src/helper/binarybuffer.h @@ -41,7 +41,7 @@ static inline void buf_set_u32(uint8_t* buffer, unsigned int first, unsigned int } else { unsigned int i; - + for (i = first; i < first + num; i++) { if (((value >> (i-first))&1) == 1) @@ -60,13 +60,13 @@ static inline uint32_t buf_get_u32(const uint8_t* buffer, unsigned int first, un { uint32_t result = 0; unsigned int i; - + for (i = first; i < first + num; i++) { if (((buffer[i/8]>>(i%8))&1) == 1) result |= 1 << (i-first); } - + return result; } } |