From ba3bcbb86ea0177349bcd021559347248d6ab10a Mon Sep 17 00:00:00 2001 From: Laurent Bercot Date: Mon, 30 Nov 2020 13:08:04 +0000 Subject: Stash temporary changes. Does not build; is not intended to. --- src/serverlib/s6rc_db_read_uint32.c | 14 ++++++++++++++ 1 file changed, 14 insertions(+) create mode 100644 src/serverlib/s6rc_db_read_uint32.c (limited to 'src/serverlib/s6rc_db_read_uint32.c') diff --git a/src/serverlib/s6rc_db_read_uint32.c b/src/serverlib/s6rc_db_read_uint32.c new file mode 100644 index 0000000..b26bf46 --- /dev/null +++ b/src/serverlib/s6rc_db_read_uint32.c @@ -0,0 +1,14 @@ +/* ISC license. */ + +#include +#include +#include + +int s6rc_db_read_uint32 (buffer *b, uint32_t *x) +{ + size_t w = 0 ; + char pack[4] ; + if (buffer_getall(b, pack, 4, &w) <= 0) return 0 ; + uint32_unpack_big(pack, x) ; + return 1 ; +} -- cgit v1.3.1