Skip to content

Commit 3c6c8ed

Browse files
Nicolas Pitrejukkar
authored andcommitted
gptp: don't cast pointers to ints
Let's use longs here so 64-bit pointers will fit. Signed-off-by: Nicolas Pitre <[email protected]>
1 parent a30162b commit 3c6c8ed

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

subsys/net/l2/ethernet/gptp/gptp_messages.h

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -46,7 +46,7 @@ extern "C" {
4646
#define GPTP_VALID_LEN(pkt, len) \
4747
(len > (NET_ETH_MINIMAL_FRAME_SIZE - GPTP_L2_HDR_LEN(pkt)))
4848
#define GPTP_L2_HDR_LEN(pkt) \
49-
((int)GPTP_HDR(pkt) - (int)NET_ETH_HDR(pkt))
49+
((long)GPTP_HDR(pkt) - (long)NET_ETH_HDR(pkt))
5050

5151
#define GPTP_SYNC_LEN \
5252
(sizeof(struct gptp_hdr) + sizeof(struct gptp_sync))

0 commit comments

Comments
 (0)