diff options
author | Nick Mathewson <nickm@torproject.org> | 2006-10-09 02:35:51 +0000 |
---|---|---|
committer | Nick Mathewson <nickm@torproject.org> | 2006-10-09 02:35:51 +0000 |
commit | c6f2d725d005f912830b523aa1d1a419f4e22ecd (patch) | |
tree | 1368757b759b80251b8a1afd343f3a5ecab0a36d /src/common/torgzip.c | |
parent | c34125503493b2a71728c1cc5e913744f797704e (diff) | |
download | tor-c6f2d725d005f912830b523aa1d1a419f4e22ecd.tar.gz tor-c6f2d725d005f912830b523aa1d1a419f4e22ecd.zip |
r8957@totoro: nickm | 2006-10-08 22:35:17 -0400
The otherwise regrettable MIPSpro C compiler warns about values set but never used, and about mixing enums and ints; these are good warnings, and so should be fixed. This removes some dead code and some potential bugs. Thanks to pnx.
svn:r8664
Diffstat (limited to 'src/common/torgzip.c')
-rw-r--r-- | src/common/torgzip.c | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/src/common/torgzip.c b/src/common/torgzip.c index 4555ec16f9..83438462a2 100644 --- a/src/common/torgzip.c +++ b/src/common/torgzip.c @@ -274,9 +274,9 @@ tor_gzip_uncompress(char **out, size_t *out_len, /** Try to tell whether the <b>in_len</b>-byte string in <b>in</b> is likely * to be compressed or not. If it is, return the likeliest compression method. - * Otherwise, return 0. + * Otherwise, return UNKNOWN_METHOD. */ -int +compress_method_t detect_compression_method(const char *in, size_t in_len) { if (in_len > 2 && !memcmp(in, "\x1f\x8b", 2)) { @@ -285,7 +285,7 @@ detect_compression_method(const char *in, size_t in_len) (ntohs(get_uint16(in)) % 31) == 0) { return ZLIB_METHOD; } else { - return 0; + return UNKNOWN_METHOD; } } |