From 81a52093a1919d9ce83f7c45cc556a40b95c923d Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?St=C3=A9phane=20Raimbault?= Date: Wed, 28 Dec 2011 14:59:20 +0100 Subject: [PATCH] Add comment about return code of flush functions --- src/modbus.c | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/src/modbus.c b/src/modbus.c index cc36d62c9..07714900e 100644 --- a/src/modbus.c +++ b/src/modbus.c @@ -121,7 +121,8 @@ int modbus_flush(modbus_t *ctx) { int rc = ctx->backend->flush(ctx); if (rc != -1 && ctx->debug) { - printf("%d bytes flushed\n", rc); + /* Not all backends are able to return the number of bytes flushed */ + printf("Bytes flushed (%d)\n", rc); } return rc; }