From fc6c274596ae35d4b336fe4187057459efa79844 Mon Sep 17 00:00:00 2001 From: Stepan Vondrak Date: Thu, 15 Oct 2015 21:05:54 +0800 Subject: [PATCH] fix missing parenthesis protection --- lib/libwebsockets.h | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/lib/libwebsockets.h b/lib/libwebsockets.h index 6b5ee4c..7ab6dca 100644 --- a/lib/libwebsockets.h +++ b/lib/libwebsockets.h @@ -1233,7 +1233,7 @@ libwebsocket_set_timeout(struct libwebsocket *wsi, #else #define _LWS_PAD_SIZE sizeof(void *) // The pointer size on any unknown arch. #endif -#define _LWS_PAD(n) (((n) % _LWS_PAD_SIZE) ? (n + (_LWS_PAD_SIZE - (n % _LWS_PAD_SIZE))) : (n)) +#define _LWS_PAD(n) (((n) % _LWS_PAD_SIZE) ? ((n) + (_LWS_PAD_SIZE - ((n) % _LWS_PAD_SIZE))) : (n)) #define LWS_SEND_BUFFER_PRE_PADDING _LWS_PAD(4 + 10 + (2 * MAX_MUX_RECURSION)) #define LWS_SEND_BUFFER_POST_PADDING 4 -- 2.7.4