Skip to content

Commit

Permalink
Prevent compiler warning
Browse files Browse the repository at this point in the history
  • Loading branch information
fredlcore committed Mar 20, 2024
1 parent 39b1104 commit db0d157
Showing 1 changed file with 4 additions and 4 deletions.
8 changes: 4 additions & 4 deletions BSB_LAN/src/modbus-esp8266/src/Modbus.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -315,10 +315,10 @@ void Modbus::slavePDU(uint8_t* frame) {
bufSize += recLen * 2 + 2; // 4 bytes for header + data
recs += 7;
}
if (bufSize > MODBUS_MAX_FRAME) { // Frame to return too large
exceptionResponse(fcode, EX_ILLEGAL_ADDRESS);
return;
}
// if (bufSize > MODBUS_MAX_FRAME) { // Frame to return too large
// exceptionResponse(fcode, EX_ILLEGAL_ADDRESS);
// return;
// }
uint8_t* srcFrame = _frame;
_frame = (uint8_t*)malloc(bufSize);
if (!_frame) {
Expand Down

0 comments on commit db0d157

Please sign in to comment.