summaryrefslogtreecommitdiff
path: root/src/libstddjb/uint32_unpack.c
blob: 9d86ac325dea450b7bba63a6568a285538fc8ba8 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
/* ISC license. */

#include <stdint.h>
#include <string.h>

#include <skalibs/uint32.h>

void uint32_unpack (char const *s, uint32_t *u)
{
  uint32_t x ;
  memcpy(&x, s, sizeof(uint32_t)) ;
  *u = uint32_little(x) ;
}