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

#include <stdint.h>
#include <string.h>
#include <skalibs/uint16.h>

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