Skip to content
This repository was archived by the owner on Sep 25, 2024. It is now read-only.

Commit b1c6c30

Browse files
committed
Moved bbp_eoffset to endian.h
1 parent 2af0ef7 commit b1c6c30

File tree

2 files changed

+4
-4
lines changed

2 files changed

+4
-4
lines changed

common.h

Lines changed: 0 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -6,10 +6,6 @@
66
#include <stdint.h>
77
#include "endian.h"
88

9-
size_t bbp_eoffset(size_t i, size_t len) {
10-
return ((bbp_host_endian() == BBP_LITTLE) ? i : (len - i - 1));
11-
}
12-
139
void bbp_print_hex(const char *label, const uint8_t *v, size_t len) {
1410
size_t i;
1511

endian.h

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -82,4 +82,8 @@ void bbp_ecopy(bbp_endian_t e, uint8_t *dst, uint8_t *src, size_t len) {
8282
}
8383
}
8484

85+
size_t bbp_eoffset(size_t i, size_t len) {
86+
return ((bbp_host_endian() == BBP_LITTLE) ? i : (len - i - 1));
87+
}
88+
8589
#endif

0 commit comments

Comments
 (0)