diff options
author | Gerd Hoffmann <kraxel@redhat.com> | 2019-05-08 13:22:33 +0200 |
---|---|---|
committer | Gerd Hoffmann <kraxel@redhat.com> | 2019-05-08 13:22:33 +0200 |
commit | 8fc776833f83c417d57c43f41479bc034c3863c6 (patch) | |
tree | 2fbe3cd51de3947f8fc5144d17b2bd57eccb6271 /readers.c | |
parent | 63b5412f8c410694e8c67452452273ae8a9a6871 (diff) | |
download | fbida-8fc776833f83c417d57c43f41479bc034c3863c6.tar.gz |
portability fixes, some modernization
Diffstat (limited to 'readers.c')
-rw-r--r-- | readers.c | 6 |
1 files changed, 3 insertions, 3 deletions
@@ -3,9 +3,9 @@ #include <stddef.h> #include <string.h> #include <assert.h> -#include <endian.h> #include "readers.h" +#include "byteorder.h" /* ----------------------------------------------------------------------- */ @@ -13,7 +13,7 @@ void load_bits_lsb(unsigned char *dst, unsigned char *src, int width, int on, int off) { int i,mask,bit; - + for (i = 0; i < width; i++) { mask = 1 << (i & 0x07); bit = src[i>>3] & mask; @@ -28,7 +28,7 @@ void load_bits_msb(unsigned char *dst, unsigned char *src, int width, int on, int off) { int i,mask,bit; - + for (i = 0; i < width; i++) { mask = 1 << (7 - (i & 0x07)); bit = src[i>>3] & mask; |