aboutsummaryrefslogtreecommitdiff
path: root/src/feature/dirparse
diff options
context:
space:
mode:
authorNick Mathewson <nickm@torproject.org>2019-09-09 15:22:16 -0400
committerNick Mathewson <nickm@torproject.org>2019-09-19 14:37:24 -0400
commitb1552e8814559fc8bf773765975fa1fded83c391 (patch)
treef559e89a2a69ed76037c52bd3fac7f7294da7509 /src/feature/dirparse
parent9cbc166ea038e51baec92c8f37a2646c76a97480 (diff)
downloadtor-b1552e8814559fc8bf773765975fa1fded83c391.tar.gz
tor-b1552e8814559fc8bf773765975fa1fded83c391.zip
Reindent microdesc_extract_body().
This commit is whitespace-only; I suggest reviewing with -b.
Diffstat (limited to 'src/feature/dirparse')
-rw-r--r--src/feature/dirparse/microdesc_parse.c30
1 files changed, 15 insertions, 15 deletions
diff --git a/src/feature/dirparse/microdesc_parse.c b/src/feature/dirparse/microdesc_parse.c
index 621e3c10dd..29bebbed31 100644
--- a/src/feature/dirparse/microdesc_parse.c
+++ b/src/feature/dirparse/microdesc_parse.c
@@ -142,24 +142,24 @@ microdesc_extract_body(microdesc_t *md,
{
const int copy_body = (where != SAVED_IN_CACHE);
- const char *cp = tor_memstr(s, start_of_next_microdesc-s,
- "onion-key");
- const int no_onion_key = (cp == NULL);
- if (no_onion_key) {
- cp = s; /* So that we have *some* junk to put in the body */
- }
+ const char *cp = tor_memstr(s, start_of_next_microdesc-s, "onion-key");
+
+ const int no_onion_key = (cp == NULL);
+ if (no_onion_key) {
+ cp = s; /* So that we have *some* junk to put in the body */
+ }
- md->bodylen = start_of_next_microdesc - cp;
- md->saved_location = where;
- if (copy_body)
- md->body = tor_memdup_nulterm(cp, md->bodylen);
- else
- md->body = (char*)cp;
- md->off = cp - start;
+ md->bodylen = start_of_next_microdesc - cp;
+ md->saved_location = where;
+ if (copy_body)
+ md->body = tor_memdup_nulterm(cp, md->bodylen);
+ else
+ md->body = (char*)cp;
+ md->off = cp - start;
- crypto_digest256(md->digest, md->body, md->bodylen, DIGEST_SHA256);
+ crypto_digest256(md->digest, md->body, md->bodylen, DIGEST_SHA256);
- return no_onion_key ? -1 : 0;
+ return no_onion_key ? -1 : 0;
}
/** Parse as many microdescriptors as are found from the string starting at