From: Pekka Riikonen Date: Sun, 13 Oct 2002 11:42:32 +0000 (+0000) Subject: Fix to pad length macros (worked before too but to be sure). X-Git-Tag: silc.client.0.9.6~24 X-Git-Url: http://git.silcnet.org/gitweb/?a=commitdiff_plain;h=0a05f5b5dd6ba2eb0fa580f0dda53c4fcc933cca;p=silc.git Fix to pad length macros (worked before too but to be sure). --- diff --git a/lib/silccore/silcchannel.c b/lib/silccore/silcchannel.c index 83f91977..e87cf934 100644 --- a/lib/silccore/silcchannel.c +++ b/lib/silccore/silcchannel.c @@ -232,7 +232,7 @@ SilcUInt32 silc_channel_get_mode(SilcChannelPayload payload) ******************************************************************************/ /* Calculates padding length for message payload */ -#define SILC_CHANNEL_MESSAGE_PAD(__payloadlen) (16 - (__payloadlen) % 16) +#define SILC_CHANNEL_MESSAGE_PAD(__payloadlen) (16 - ((__payloadlen) % 16)) /* Header length plus maximum padding length */ #define SILC_CHANNEL_MESSAGE_HLEN 6 + 16 diff --git a/lib/silccore/silcprivate.c b/lib/silccore/silcprivate.c index 3ddf7307..e5ae3069 100644 --- a/lib/silccore/silcprivate.c +++ b/lib/silccore/silcprivate.c @@ -30,7 +30,7 @@ ******************************************************************************/ /* Calculates padding length for message payload */ -#define SILC_PRIVATE_MESSAGE_PAD(__payloadlen) (16 - (__payloadlen) % 16) +#define SILC_PRIVATE_MESSAGE_PAD(__payloadlen) (16 - ((__payloadlen) % 16)) /* Header length plus maximum padding length */ #define SILC_PRIVATE_MESSAGE_HLEN 4 + 16