ソースを参照

Add comment about return code of flush functions

Stéphane Raimbault 13 年 前
コミット
81a52093a1
1 ファイル変更2 行追加1 行削除
  1. 2 1
      src/modbus.c

+ 2 - 1
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;
 }