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

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

#include <skalibs/uint16.h>

void uint16_unpack (char const *s, uint16_t *u)
{
  uint16_t x ;
  memcpy(&x, s, sizeof(uint16_t)) ;
  *u = uint16_little(x) ;
}