aboutsummaryrefslogtreecommitdiff
path: root/lib/mpack
diff options
context:
space:
mode:
authorLoek Le Blansch <loek@pipeframe.xyz>2024-06-26 15:44:26 +0200
committerLoek Le Blansch <loek@pipeframe.xyz>2024-06-26 15:44:26 +0200
commitee5d161f6153e1f9da73e477f63f38dcf52ca10c (patch)
tree926413950f64ed7b0f45f6b3551c16446ecd08d4 /lib/mpack
parentc77d271d9cb86bf6893098ec6c431fc87945e6c9 (diff)
`make format`
Diffstat (limited to 'lib/mpack')
-rw-r--r--lib/mpack/mpack.h4
-rw-r--r--lib/mpack/read-remaining.c7
2 files changed, 5 insertions, 6 deletions
diff --git a/lib/mpack/mpack.h b/lib/mpack/mpack.h
index 33521c4..1fbea67 100644
--- a/lib/mpack/mpack.h
+++ b/lib/mpack/mpack.h
@@ -30,11 +30,11 @@ extern "C" {
*
* \return Amount of bytes read
*/
-size_t mpack_read_remaining_bytes(mpack_reader_t * reader, char * p, size_t count);
+size_t mpack_read_remaining_bytes(mpack_reader_t * reader, char * p,
+ size_t count);
/// \}
#ifdef __cplusplus
}
#endif
-
diff --git a/lib/mpack/read-remaining.c b/lib/mpack/read-remaining.c
index 46b5815..8161c25 100644
--- a/lib/mpack/read-remaining.c
+++ b/lib/mpack/read-remaining.c
@@ -1,10 +1,9 @@
#include "mpack.h"
-size_t mpack_read_remaining_bytes(mpack_reader_t * reader, char * p, size_t count) {
+size_t mpack_read_remaining_bytes(mpack_reader_t * reader, char * p,
+ size_t count) {
size_t limit = mpack_reader_remaining(reader, NULL);
- if (0 < count && count < limit)
- limit = count;
+ if (0 < count && count < limit) limit = count;
MPACK_MEMCPY(p, reader->data, limit);
return limit;
}
-