Skip to content

Commit 0a488a5

Browse files
mkm85thiagomacieira
authored andcommitted
use cbor_ntohll instead of ntohl directly
1 parent 22c2980 commit 0a488a5

File tree

1 file changed

+1
-2
lines changed

1 file changed

+1
-2
lines changed

src/compilersupport_p.h

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -156,7 +156,7 @@
156156
(defined(BYTE_ORDER) && defined(LITTLE_ENDIAN) && BYTE_ORDER == LITTLE_ENDIAN) || \
157157
defined(_LITTLE_ENDIAN) || defined(__LITTLE_ENDIAN__) || defined(__ARMEL__) || defined(__MIPSEL__) || \
158158
defined(__i386) || defined(__i386__) || defined(__x86_64) || defined(__x86_64__) || defined(__amd64)
159-
# define ntohll(x) ((ntohl((uint32_t)(x)) * UINT64_C(0x100000000)) + (ntohl((x) >> 32)))
159+
# define ntohll(x) ((cbor_ntohl((uint32_t)(x)) * UINT64_C(0x100000000)) + (cbor_ntohl((x) >> 32)))
160160
# define htonll ntohll
161161
# else
162162
# error "Unable to determine byte order!"
@@ -202,4 +202,3 @@ static inline bool add_check_overflow(size_t v1, size_t v2, size_t *r)
202202
}
203203

204204
#endif /* COMPILERSUPPORT_H */
205-

0 commit comments

Comments
 (0)