浏览代码

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>
Tobias Doerffel 15 年之前
父节点
当前提交
01ba9771ee
共有 1 个文件被更改,包括 1 次插入1 次删除
  1. 1 1
      src/modbus.c

+ 1 - 1
src/modbus.c

@@ -100,7 +100,7 @@ void _error_print(modbus_t *ctx, const char *context)
 
 int modbus_flush(modbus_t *ctx)
 {
-    ctx->backend->flush(ctx);
+    return ctx->backend->flush(ctx);
 }
 
 /* Computes the length of the expected response */