Commit 01ba9771ee6ea9e49959fa1058d5b7d794997377

Authored by Tobias Doerffel
Committed by Stéphane Raimbault
1 parent 70a14990

Fixed return value in modbus_flush()

In modbus_flush() we should return the return value of the backend's
flush() function.

Signed-off-by: Stéphane Raimbault <stephane.raimbault@gmail.com>
Showing 1 changed file with 1 additions and 1 deletions
src/modbus.c
@@ -100,7 +100,7 @@ void _error_print(modbus_t *ctx, const char *context) @@ -100,7 +100,7 @@ void _error_print(modbus_t *ctx, const char *context)
100 100
101 int modbus_flush(modbus_t *ctx) 101 int modbus_flush(modbus_t *ctx)
102 { 102 {
103 - ctx->backend->flush(ctx); 103 + return ctx->backend->flush(ctx);
104 } 104 }
105 105
106 /* Computes the length of the expected response */ 106 /* Computes the length of the expected response */