summaryrefslogtreecommitdiff
path: root/src/libstddjb/uint16_pack.c
blob: 0b2f8df1374376a529302db244d364e64479f87f (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_pack (char *s, uint16_t u)
{
  uint16_littlep(&u) ;
  memcpy(s, &u, sizeof(uint16_t)) ;
}