--- a/mb_rtu_private.h Wed Jun 02 09:23:13 2021 +0100
+++ b/mb_rtu_private.h Wed Jun 02 11:09:57 2021 +0100
@@ -49,7 +49,7 @@
* due to the algorithm used to work around aborted frames.
*/
#define RECV_BUFFER_SIZE_SMALL (MAX_RTU_FRAME_LENGTH + 10)
-#define RECV_BUFFER_SIZE_LARGE (2 * MAX_RTU_FRAME_LENGTH)
+#define RECV_BUFFER_SIZE_LARGE (2 * (MAX_RTU_FRAME_LENGTH))
/* Frame lengths... */
--- a/mb_util.h Wed Jun 02 09:23:13 2021 +0100
+++ b/mb_util.h Wed Jun 02 11:09:57 2021 +0100
@@ -86,7 +86,7 @@
#define TCP_HEADER_LENGTH 6
/* Global Frame sizes */
-#define MAX_RTU_FRAME_LENGTH MAX_L2_FRAME_LENGTH + RTU_FRAME_CRC_LENGTH
+#define MAX_RTU_FRAME_LENGTH (MAX_L2_FRAME_LENGTH + RTU_FRAME_CRC_LENGTH)
#define MAX_ASC_FRAME_LENGTH ((MAX_L2_FRAME_LENGTH * L2_TO_ASC_CODING) + \
ASC_FRAME_HEADER_LENGTH + ASC_FRAME_TAIL_LENGTH + \
ASC_FRAME_LRC_LENGTH)