]> git.ipfire.org Git - thirdparty/chrony.git/commitdiff
pktlength: fix compiler warning on Mac OS X
authorMiroslav Lichvar <mlichvar@redhat.com>
Mon, 25 Jan 2016 11:33:42 +0000 (12:33 +0100)
committerMiroslav Lichvar <mlichvar@redhat.com>
Mon, 25 Jan 2016 11:33:42 +0000 (12:33 +0100)
pktlength.c

index 7c37fc198948af0b73ed39c7831efc1bd6ef10fe..96d9e245b62230c81f8cfa8d7c1c54ed41c0e96a 100644 (file)
@@ -34,7 +34,7 @@
 #include "pktlength.h"
 
 #define PADDING_LENGTH_(request_length, reply_length) \
-  ((request_length) < (reply_length) ? (reply_length) - (request_length) : 0)
+  (uint16_t)((request_length) < (reply_length) ? (reply_length) - (request_length) : 0)
 
 #define PADDING_LENGTH(request_data, reply_data) \
   PADDING_LENGTH_(offsetof(CMD_Request, request_data), offsetof(CMD_Reply, reply_data))