Procházet zdrojové kódy

Add comment about return code of flush functions

Stéphane Raimbault před 13 roky
rodič
revize
81a52093a1
1 změnil soubory, kde provedl 2 přidání a 1 odebrání
  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;
 }