[PATCH 5/8] Parenthesize size calculations.

Jonathan Bastien-Filiatrault joe at x2a.org
Thu Sep 9 00:34:44 CEST 2010


This is standard practice and the DTLS code got bit by this.

Signed-off-by: Jonathan Bastien-Filiatrault <joe at x2a.org>

diff --git a/lib/gnutls_int.h b/lib/gnutls_int.h
index 2d37678..4cdff88 100644
--- a/lib/gnutls_int.h
+++ b/lib/gnutls_int.h
@@ -115,8 +115,8 @@ typedef struct
 #define MAX_RECORD_RECV_SIZE (size_t)session->security_parameters.max_record_recv_size
 #define MAX_PAD_SIZE 255
 #define EXTRA_COMP_SIZE 2048
-#define MAX_RECORD_OVERHEAD MAX_PAD_SIZE+EXTRA_COMP_SIZE
-#define MAX_RECV_SIZE MAX_RECORD_OVERHEAD+MAX_RECORD_RECV_SIZE+RECORD_HEADER_SIZE
+#define MAX_RECORD_OVERHEAD (MAX_PAD_SIZE+EXTRA_COMP_SIZE)
+#define MAX_RECV_SIZE (MAX_RECORD_OVERHEAD+MAX_RECORD_RECV_SIZE+RECORD_HEADER_SIZE)
 
 #define HANDSHAKE_HEADER_SIZE 4
 
-- 
1.7.1





More information about the Gnutls-devel mailing list