]> sigrok.org Git - libsigrok.git/commitdiff
binary_helpers: Reflect that bv_get_value() takes bytes as input
authorMathieu Pilato <redacted>
Fri, 31 Mar 2023 20:04:05 +0000 (22:04 +0200)
committerGerhard Sittig <redacted>
Sun, 30 Apr 2023 09:34:07 +0000 (11:34 +0200)
Prefer uint8_t pointers over void pointers in the bv_get_value()
signature for improved awareness.

src/binary_helpers.c
src/libsigrok-internal.h

index e15787e9feb0f655b40b69f12a850499ddc4bdb0..e8547a01103686260714fc6094f41d64c8a3a57d 100644 (file)
@@ -23,7 +23,7 @@
 #include "libsigrok-internal.h"
 
 SR_PRIV int bv_get_value(float *out, const struct binary_value_spec *spec,
-       const void *data, size_t length)
+       const uint8_t *data, size_t length)
 {
        float value;
 
index bb7e2a9c4334f3cb7e9fc3eee2e4b61dbd13898d..46865efc0b00dbcceb5751a65ea9af059859654e 100644 (file)
@@ -2250,7 +2250,7 @@ struct binary_value_spec {
  * @return SR_OK on success, SR_ERR_* error code on failure.
  */
 SR_PRIV int bv_get_value(float *out, const struct binary_value_spec *spec,
-       const void *data, size_t length);
+       const uint8_t *data, size_t length);
 
 /*--- crc.c -----------------------------------------------------------------*/