From d5f06ec9100b3a8fe4378684e55879a6d5196db8 Mon Sep 17 00:00:00 2001 From: Stefan Wahren Date: Sat, 5 Oct 2013 10:38:07 +0200 Subject: [PATCH] Replace magic number for M-Bus frame data length with define --- mbus/mbus-protocol.h | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/mbus/mbus-protocol.h b/mbus/mbus-protocol.h index cbc5c7b..634adb1 100755 --- a/mbus/mbus-protocol.h +++ b/mbus/mbus-protocol.h @@ -70,6 +70,8 @@ extern "C" { // // +#define MBUS_FRAME_DATA_LENGTH 252 + typedef struct _mbus_frame { unsigned char start1; @@ -83,7 +85,7 @@ typedef struct _mbus_frame { unsigned char checksum; unsigned char stop; - unsigned char data[252]; + unsigned char data[MBUS_FRAME_DATA_LENGTH]; size_t data_size; int type;