-rw-r--r-- 165 saferewrite-20241004/src/uint16_store_bigendian/ref/store.c raw#include <stdint.h> #include <string.h> #include <endian.h> void uint16_store_bigendian(unsigned char *s,uint16_t x) { x = htobe16(x); memcpy(s,&x,sizeof x); }