blob: 05d1f9e17a4c42d4726c80d2144e3981e7cdc39c (
plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
|
/* ISC license. */
#include <skalibs/uint32.h>
#include <skalibs/buffer.h>
#include <s6-rc/s6rc-db.h>
int s6rc_db_read_uint32 (buffer *b, uint32 *x)
{
unsigned int w = 0 ;
char pack[4] ;
if (buffer_getall(b, pack, 4, &w) <= 0) return 0 ;
uint32_unpack_big(pack, x) ;
return 1 ;
}
|