소스 검색

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