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,14 +1100,8 @@ 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) { return tor_uncompress(out, outlen, (const char *)body, bodylen,
*out = tor_memdup_nulterm(body, bodylen); method, 1, LOG_WARN);
*outlen = bodylen;
return 0;
} else {
return tor_uncompress(out, outlen, (const char *)body, bodylen,
method, 1, LOG_WARN);
}
} }
/** /**