mirror of
https://gitlab.com/chrony/chrony.git
synced 2025-12-04 23:25:06 -05:00
Quash a load of compile warnings
Kevin Lyda writes: I enclose the following patch which removes all but three of the warnings. i don't have any non-linux systems handy to test a fix to the round() function. but having it return a double should be fine. It doesn't actually fix anything, it just shuts up -Wall, so it's certainly an optional type of patch.
This commit is contained in:
committed by
Richard P. Curnow
parent
3a8f93792b
commit
2a30c56f03
@@ -378,7 +378,7 @@ generate_packet_auth(NTP_Packet *pkt, unsigned long keyid)
|
||||
if (keyok) {
|
||||
pkt->auth_keyid = htonl(keyid);
|
||||
MD5Init(&ctx);
|
||||
MD5Update(&ctx, keytext, keylen);
|
||||
MD5Update(&ctx, (unsigned char *) keytext, keylen);
|
||||
MD5Update(&ctx, (unsigned char *) pkt, offsetof(NTP_Packet, auth_keyid));
|
||||
MD5Final(&ctx);
|
||||
memcpy(&(pkt->auth_data), &ctx.digest, 16);
|
||||
@@ -447,7 +447,7 @@ check_packet_auth(NTP_Packet *pkt, unsigned long keyid)
|
||||
if (keyok) {
|
||||
pkt->auth_keyid = htonl(keyid);
|
||||
MD5Init(&ctx);
|
||||
MD5Update(&ctx, keytext, keylen);
|
||||
MD5Update(&ctx, (unsigned char *) keytext, keylen);
|
||||
MD5Update(&ctx, (unsigned char *) pkt, offsetof(NTP_Packet, auth_keyid));
|
||||
MD5Final(&ctx);
|
||||
if (!memcmp((void *) &ctx.digest, (void *) &(pkt->auth_data), 16)) {
|
||||
|
||||
Reference in New Issue
Block a user