aboutsummaryrefslogtreecommitdiffstats
path: root/readers.c
diff options
context:
space:
mode:
authorGerd Hoffmann <kraxel@redhat.com>2019-05-08 13:22:33 +0200
committerGerd Hoffmann <kraxel@redhat.com>2019-05-08 13:22:33 +0200
commit8fc776833f83c417d57c43f41479bc034c3863c6 (patch)
tree2fbe3cd51de3947f8fc5144d17b2bd57eccb6271 /readers.c
parent63b5412f8c410694e8c67452452273ae8a9a6871 (diff)
downloadfbida-8fc776833f83c417d57c43f41479bc034c3863c6.tar.gz
portability fixes, some modernization
Diffstat (limited to 'readers.c')
-rw-r--r--readers.c6
1 files changed, 3 insertions, 3 deletions
diff --git a/readers.c b/readers.c
index b7e8899..e94bbcb 100644
--- a/readers.c
+++ b/readers.c
@@ -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;