diff options
author | Roger Dingledine <arma@torproject.org> | 2016-05-27 10:01:37 -0400 |
---|---|---|
committer | Roger Dingledine <arma@torproject.org> | 2016-05-27 11:15:21 -0400 |
commit | 500c4bf8075f6530dbbcf1e63bac749d16f5afee (patch) | |
tree | ef408ebdf07cb2a5a0dabc85adab78c56857e8f7 /src/or/directory.c | |
parent | 11d52a449c61b24588c17688892e07fa395ffd0c (diff) | |
download | tor-500c4bf8075f6530dbbcf1e63bac749d16f5afee.tar.gz tor-500c4bf8075f6530dbbcf1e63bac749d16f5afee.zip |
remove an unneeded layer of indentation
no actual behavior changes
Diffstat (limited to 'src/or/directory.c')
-rw-r--r-- | src/or/directory.c | 32 |
1 files changed, 15 insertions, 17 deletions
diff --git a/src/or/directory.c b/src/or/directory.c index 04a3cedc3c..b086fc78ed 100644 --- a/src/or/directory.c +++ b/src/or/directory.c @@ -2875,23 +2875,21 @@ static int handle_get_frontpage(dir_connection_t *conn, const get_handler_args_t *args) { (void) args; /* unused */ - { - const char *frontpage = get_dirportfrontpage(); - - if (frontpage) { - size_t dlen; - dlen = strlen(frontpage); - /* Let's return a disclaimer page (users shouldn't use V1 anymore, - and caches don't fetch '/', so this is safe). */ - - /* [We don't check for write_bucket_low here, since we want to serve - * this page no matter what.] */ - write_http_response_header_impl(conn, dlen, "text/html", "identity", - NULL, DIRPORTFRONTPAGE_CACHE_LIFETIME); - connection_write_to_buf(frontpage, dlen, TO_CONN(conn)); - } else { - write_http_status_line(conn, 404, "Not found"); - } + const char *frontpage = get_dirportfrontpage(); + + if (frontpage) { + size_t dlen; + dlen = strlen(frontpage); + /* Let's return a disclaimer page (users shouldn't use V1 anymore, + and caches don't fetch '/', so this is safe). */ + + /* [We don't check for write_bucket_low here, since we want to serve + * this page no matter what.] */ + write_http_response_header_impl(conn, dlen, "text/html", "identity", + NULL, DIRPORTFRONTPAGE_CACHE_LIFETIME); + connection_write_to_buf(frontpage, dlen, TO_CONN(conn)); + } else { + write_http_status_line(conn, 404, "Not found"); } return 0; } |