[tor-commits] [tor/master] Reindent microdesc_extract_body().
asn at torproject.org
asn at torproject.org
Wed Sep 25 11:13:20 UTC 2019
commit b1552e8814559fc8bf773765975fa1fded83c391
Author: Nick Mathewson <nickm at torproject.org>
Date: Mon Sep 9 15:22:16 2019 -0400
Reindent microdesc_extract_body().
This commit is whitespace-only; I suggest reviewing with -b.
---
src/feature/dirparse/microdesc_parse.c | 30 +++++++++++++++---------------
1 file changed, 15 insertions(+), 15 deletions(-)
diff --git a/src/feature/dirparse/microdesc_parse.c b/src/feature/dirparse/microdesc_parse.c
index 621e3c10d..29bebbed3 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
More information about the tor-commits
mailing list