diff options
author | Nick Mathewson <nickm@torproject.org> | 2011-05-10 16:23:43 -0400 |
---|---|---|
committer | Nick Mathewson <nickm@torproject.org> | 2011-05-11 16:12:51 -0400 |
commit | db7b2a33eef9c8d432442b072f9c8868a068bb91 (patch) | |
tree | ce364a8c6abea10a8e21460cdc205f590cb820d5 /src/common/torgzip.c | |
parent | 1d703ed22b249567c2df31db9035a4dda66483ca (diff) | |
download | tor-db7b2a33eef9c8d432442b072f9c8868a068bb91.tar.gz tor-db7b2a33eef9c8d432442b072f9c8868a068bb91.zip |
Automated conversion of memcmp to tor_memcmp/tor_mem[n]eq
This commit is _exactly_ the result of
perl -i -pe 's/\bmemcmp\(/tor_memcmp\(/g' src/*/*.[ch]
perl -i -pe 's/\!\s*tor_memcmp\(/tor_memeq\(/g' src/*/*.[ch]
perl -i -pe 's/0\s*==\s*tor_memcmp\(/tor_memeq\(/g' src/*/*.[ch]
perl -i -pe 's/0\s*!=\s*tor_memcmp\(/tor_memneq\(/g' src/*/*.[ch]
git checkout src/common/di_ops.[ch]
git checkout src/or/test.c
git checkout src/common/test.h
Diffstat (limited to 'src/common/torgzip.c')
-rw-r--r-- | src/common/torgzip.c | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/src/common/torgzip.c b/src/common/torgzip.c index 249151cc9b..51b29baca1 100644 --- a/src/common/torgzip.c +++ b/src/common/torgzip.c @@ -356,7 +356,7 @@ tor_gzip_uncompress(char **out, size_t *out_len, compress_method_t detect_compression_method(const char *in, size_t in_len) { - if (in_len > 2 && !memcmp(in, "\x1f\x8b", 2)) { + if (in_len > 2 && tor_memeq(in, "\x1f\x8b", 2)) { return GZIP_METHOD; } else if (in_len > 2 && (in[0] & 0x0f) == 8 && (ntohs(get_uint16(in)) % 31) == 0) { |