summaryrefslogtreecommitdiff
path: root/src/lib/compress
diff options
context:
space:
mode:
authorNick Mathewson <nickm@torproject.org>2018-06-28 13:39:49 -0400
committerNick Mathewson <nickm@torproject.org>2018-06-28 13:39:49 -0400
commit7d7af19f1b282554df5117c5c963736d0253a8d5 (patch)
tree89cfe75c9bc251c15d6fafd316b63f50180847ec /src/lib/compress
parent326c473b793d6dfa5fcdb3dbd5a73e5f0d502d54 (diff)
downloadtor-7d7af19f1b282554df5117c5c963736d0253a8d5.tar.gz
tor-7d7af19f1b282554df5117c5c963736d0253a8d5.zip
Use tor_ntohs in compress.c; avoid a winsocks dependency
Diffstat (limited to 'src/lib/compress')
-rw-r--r--src/lib/compress/compress.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/src/lib/compress/compress.c b/src/lib/compress/compress.c
index 23a5c03044..2cb5dbaec2 100644
--- a/src/lib/compress/compress.c
+++ b/src/lib/compress/compress.c
@@ -281,7 +281,7 @@ detect_compression_method(const char *in, size_t in_len)
if (in_len > 2 && fast_memeq(in, "\x1f\x8b", 2)) {
return GZIP_METHOD;
} else if (in_len > 2 && (in[0] & 0x0f) == 8 &&
- (ntohs(get_uint16(in)) % 31) == 0) {
+ (tor_ntohs(get_uint16(in)) % 31) == 0) {
return ZLIB_METHOD;
} else if (in_len > 2 &&
fast_memeq(in, "\x5d\x00\x00", 3)) {