mirror of
https://github.com/shadowsocks/shadowsocks-libev.git
synced 2026-10-30 13:13:44 +00:00
Refine the helper function
This commit is contained in:
@@ -551,3 +551,10 @@ get_default_conf(void)
|
||||
return "config.json";
|
||||
#endif
|
||||
}
|
||||
|
||||
uint16_t load16_be(const void *s)
|
||||
{
|
||||
const uint8_t *in = (const uint8_t *)s;
|
||||
return ((uint16_t)in[0] << 8)
|
||||
| ((uint16_t)in[1]);
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user