mirror of
https://gitlab.torproject.org/tpo/core/tor.git
synced 2025-02-25 23:21:38 +01:00
Short-circuit the no-decompression-needed case, for clarity
This commit is mostly just deindentation.
This commit is contained in:
parent
c0e9698fca
commit
9018da06c7
1 changed files with 76 additions and 73 deletions
|
@ -2205,7 +2205,11 @@ dir_client_decompress_response_body(char **bodyp, size_t *bodylenp,
|
||||||
conn->base_.purpose == DIR_PURPOSE_FETCH_MICRODESC);
|
conn->base_.purpose == DIR_PURPOSE_FETCH_MICRODESC);
|
||||||
|
|
||||||
int plausible = body_is_plausible(body, body_len, conn->base_.purpose);
|
int plausible = body_is_plausible(body, body_len, conn->base_.purpose);
|
||||||
if (compression != NO_METHOD || !plausible) {
|
|
||||||
|
if (plausible && compression == NO_METHOD) {
|
||||||
|
return 0;
|
||||||
|
}
|
||||||
|
|
||||||
int severity = LOG_DEBUG;
|
int severity = LOG_DEBUG;
|
||||||
char *new_body = NULL;
|
char *new_body = NULL;
|
||||||
size_t new_len = 0;
|
size_t new_len = 0;
|
||||||
|
@ -2287,7 +2291,6 @@ dir_client_decompress_response_body(char **bodyp, size_t *bodylenp,
|
||||||
*bodyp = new_body;
|
*bodyp = new_body;
|
||||||
*bodylenp = new_len;
|
*bodylenp = new_len;
|
||||||
}
|
}
|
||||||
}
|
|
||||||
|
|
||||||
done:
|
done:
|
||||||
return rv;
|
return rv;
|
||||||
|
|
Loading…
Add table
Reference in a new issue