mirror of
https://gitlab.com/chrony/chrony.git
synced 2025-12-03 18:25:07 -05:00
ntp: keep all length constants signed
This should make it harder to accidentally create an unsafe comparison between signed and unsigned values.
This commit is contained in:
2
ntp.h
2
ntp.h
@@ -94,7 +94,7 @@ typedef struct {
|
|||||||
uint8_t auth_data[NTP_MAX_MAC_LENGTH];
|
uint8_t auth_data[NTP_MAX_MAC_LENGTH];
|
||||||
} NTP_Packet;
|
} NTP_Packet;
|
||||||
|
|
||||||
#define NTP_NORMAL_PACKET_LENGTH offsetof(NTP_Packet, auth_keyid)
|
#define NTP_NORMAL_PACKET_LENGTH (int)offsetof(NTP_Packet, auth_keyid)
|
||||||
|
|
||||||
/* The buffer used to hold a datagram read from the network */
|
/* The buffer used to hold a datagram read from the network */
|
||||||
typedef struct {
|
typedef struct {
|
||||||
|
|||||||
Reference in New Issue
Block a user