summaryrefslogtreecommitdiff
path: root/src/libstddjb/uint16_unpack_big.c
blob: b09abcd6179ce47bf76db793945a0a4569ebca70 (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_big (char const *s, uint16_t *u)
{
  uint16_t x ;
  memcpy(&x, s, sizeof(uint16_t)) ;
  *u = uint16_big(x) ;
}