Преглед изворни кода

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;
 }