Remove special-casing for NO_METHOD in consdiffmgr.c

This commit is contained in:
Nick Mathewson 2017-05-02 08:37:57 -04:00
parent 584ab1f29b
commit fd437f2a02

View File

@ -1100,15 +1100,9 @@ uncompress_or_copy(char **out, size_t *outlen,
if (lv_compression) if (lv_compression)
method = compression_method_get_by_name(lv_compression); method = compression_method_get_by_name(lv_compression);
if (method == NO_METHOD) {
*out = tor_memdup_nulterm(body, bodylen);
*outlen = bodylen;
return 0;
} else {
return tor_uncompress(out, outlen, (const char *)body, bodylen, return tor_uncompress(out, outlen, (const char *)body, bodylen,
method, 1, LOG_WARN); method, 1, LOG_WARN);
} }
}
/** /**
* Worker function. This function runs inside a worker thread and receives * Worker function. This function runs inside a worker thread and receives