diff options
author | nghttp2 upstream <kwrobot@kitware.com> | 2023-02-13 11:59:29 (GMT) |
---|---|---|
committer | Brad King <brad.king@kitware.com> | 2023-02-16 20:24:13 (GMT) |
commit | 7eee97387a4e7e8a6ae1c59168a3d5c303076dcc (patch) | |
tree | 712029d1a09a225752c0f125d59ba15d923a78a9 /lib/nghttp2_net.h | |
parent | 2355f502779794a1f446449707f20edbd284a8b9 (diff) | |
download | CMake-7eee97387a4e7e8a6ae1c59168a3d5c303076dcc.zip CMake-7eee97387a4e7e8a6ae1c59168a3d5c303076dcc.tar.gz CMake-7eee97387a4e7e8a6ae1c59168a3d5c303076dcc.tar.bz2 |
nghttp2 2023-02-13 (be049129)
Code extracted from:
https://github.com/nghttp2/nghttp2.git
at commit be0491294a63d891bd12b6b1b7e372a45a5d0ffe (v1.52.0).
Diffstat (limited to 'lib/nghttp2_net.h')
-rw-r--r-- | lib/nghttp2_net.h | 8 |
1 files changed, 4 insertions, 4 deletions
diff --git a/lib/nghttp2_net.h b/lib/nghttp2_net.h index 345f6c8..521f981 100644 --- a/lib/nghttp2_net.h +++ b/lib/nghttp2_net.h @@ -71,9 +71,9 @@ STIN uint16_t htons(uint16_t hostshort) { STIN uint32_t ntohl(uint32_t netlong) { uint32_t res; unsigned char *p = (unsigned char *)&netlong; - res = *p++ << 24; - res += *p++ << 16; - res += *p++ << 8; + res = (uint32_t)(*p++ << 24); + res += (uint32_t)(*p++ << 16); + res += (uint32_t)(*p++ << 8); res += *p; return res; } @@ -81,7 +81,7 @@ STIN uint32_t ntohl(uint32_t netlong) { STIN uint16_t ntohs(uint16_t netshort) { uint16_t res; unsigned char *p = (unsigned char *)&netshort; - res = *p++ << 8; + res = (uint16_t)(*p++ << 8); res += *p; return res; } |