aboutsummaryrefslogtreecommitdiff
path: root/src/or
diff options
context:
space:
mode:
Diffstat (limited to 'src/or')
-rw-r--r--src/or/connection.c2
-rw-r--r--src/or/directory.c2
2 files changed, 2 insertions, 2 deletions
diff --git a/src/or/connection.c b/src/or/connection.c
index e64a623ff1..6564b2d504 100644
--- a/src/or/connection.c
+++ b/src/or/connection.c
@@ -2250,7 +2250,7 @@ _connection_write_to_buf_impl(const char *string, size_t len,
/* XXXX This function really needs to return -1 on failure. */
int r;
size_t old_datalen;
- if (!len)
+ if (!len && !(zlib<0))
return;
/* if it's marked for close, only allow write if we mean to flush it */
if (conn->marked_for_close && !conn->hold_open_until_flushed)
diff --git a/src/or/directory.c b/src/or/directory.c
index c64f290c04..0a7c562fdd 100644
--- a/src/or/directory.c
+++ b/src/or/directory.c
@@ -2385,7 +2385,7 @@ directory_handle_command_get(dir_connection_t *conn, const char *headers,
estimated_len += body_len;
SMARTLIST_FOREACH(items, const char *, item, {
size_t ln = strlen(item);
- if (compressed ) {
+ if (compressed) {
estimated_len += ln/2;
} else {
body_len += ln; estimated_len += ln;