Skip to content

Commit

Permalink
Add comment about return code of flush functions
Browse files Browse the repository at this point in the history
  • Loading branch information
stephane committed Dec 28, 2011
1 parent 9d5344c commit 81a5209
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion src/modbus.c
Expand Up @@ -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;
}
Expand Down

0 comments on commit 81a5209

Please sign in to comment.