Skip to content
Permalink
Browse files

gptp: don't cast pointers to ints

Let's use longs here so 64-bit pointers will fit.

Signed-off-by: Nicolas Pitre <npitre@baylibre.com>
  • Loading branch information...
Nicolas Pitre authored and jukkar committed May 22, 2019
1 parent a30162b commit 3c6c8ed0636cddf15cef0d7cafdd4d513f9aa201
Showing with 1 addition and 1 deletion.
  1. +1 −1 subsys/net/l2/ethernet/gptp/gptp_messages.h
@@ -46,7 +46,7 @@ extern "C" {
#define GPTP_VALID_LEN(pkt, len) \
(len > (NET_ETH_MINIMAL_FRAME_SIZE - GPTP_L2_HDR_LEN(pkt)))
#define GPTP_L2_HDR_LEN(pkt) \
((int)GPTP_HDR(pkt) - (int)NET_ETH_HDR(pkt))
((long)GPTP_HDR(pkt) - (long)NET_ETH_HDR(pkt))

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

0 comments on commit 3c6c8ed

Please sign in to comment.
You can’t perform that action at this time.