Commit 1e288713828c9a3df504db323621852900ad2cc6

Authored by Stéphane Raimbault
1 parent 0b22e719

Constant for broacast and test ordering

Showing 1 changed file with 1 additions and 1 deletions
src/modbus-rtu.c
... ... @@ -348,7 +348,7 @@ static int _modbus_rtu_pre_check_confirmation(modbus_t *ctx, const uint8_t *req,
348 348 {
349 349 /* Check responding slave is the slave we requested (except for broacast
350 350 * request) */
351   - if (req[0] != 0 && req[0] != rsp[0]) {
  351 + if (req[0] != rsp[0] && req[0] != MODBUS_BROADCAST_ADDRESS) {
352 352 if (ctx->debug) {
353 353 fprintf(stderr,
354 354 "The responding slave %d isn't the requested slave %d",
... ...