]> git.ipfire.org Git - thirdparty/tor.git/commitdiff
Fixup whitespace issues from 3122 commit
authorNick Mathewson <nickm@torproject.org>
Mon, 16 May 2011 00:06:36 +0000 (20:06 -0400)
committerNick Mathewson <nickm@torproject.org>
Mon, 16 May 2011 00:06:36 +0000 (20:06 -0400)
src/common/container.h
src/common/di_ops.h
src/or/dirvote.c
src/or/networkstatus.c
src/or/routerlist.c

index bb7cb89fc519b01c6d767a83ac9476befbe6fa34..39619b0096c6fafa3273f867945bbef7c979e0b9 100644 (file)
@@ -241,7 +241,7 @@ char *smartlist_join_strings2(smartlist_t *sl, const char *join,
  * Example use:
  *  SMARTLIST_FOREACH_JOIN(routerstatus_list, routerstatus_t *, rs,
  *                     routerinfo_list, routerinfo_t *, ri,
- *                     tor_memcmp(rs->identity_digest, ri->identity_digest, 20),
+ *                    tor_memcmp(rs->identity_digest, ri->identity_digest, 20),
  *                     log_info(LD_GENERAL,"No match for %s", ri->nickname)) {
  *    log_info(LD_GENERAL, "%s matches routerstatus %p", ri->nickname, rs);
  * } SMARTLIST_FOREACH_JOIN_END(rs, ri);
index 4a212b0ca23ddef00679d7d6fc745baced22ea59..fa7d86806a0679dc061e8d0848f5982e55e39bbb 100644 (file)
@@ -28,3 +28,4 @@ int tor_memeq(const void *a, const void *b, size_t sz);
 #define fast_memneq(a,b,c) (0!=memcmp((a),(b),(c)))
 
 #endif
+
index 9e763bdc91e60e5abb4aade714b954e0d2cc4993..f1381988c90b72ae85234aa838194eaf211e2ec4 100644 (file)
@@ -314,8 +314,9 @@ compare_vote_rs(const vote_routerstatus_t *a, const vote_routerstatus_t *b)
   if ((r = fast_memcmp(a->status.identity_digest, b->status.identity_digest,
                   DIGEST_LEN)))
     return r;
-  if ((r = fast_memcmp(a->status.descriptor_digest, b->status.descriptor_digest,
-                  DIGEST_LEN)))
+  if ((r = fast_memcmp(a->status.descriptor_digest,
+                       b->status.descriptor_digest,
+                       DIGEST_LEN)))
     return r;
   if ((r = (int)(b->status.published_on - a->status.published_on)))
     return r;
@@ -823,7 +824,8 @@ networkstatus_compute_consensus(smartlist_t *votes,
         if (index[v_sl_idx] < size[v_sl_idx]) {
           rs = smartlist_get(v->routerstatus_list, index[v_sl_idx]);
           if (!lowest_id ||
-              fast_memcmp(rs->status.identity_digest, lowest_id, DIGEST_LEN) < 0)
+              fast_memcmp(rs->status.identity_digest,
+                          lowest_id, DIGEST_LEN) < 0)
             lowest_id = rs->status.identity_digest;
         }
       });
@@ -881,7 +883,7 @@ networkstatus_compute_consensus(smartlist_t *votes,
        * routerinfo and its contents are. */
       rs = compute_routerstatus_consensus(matching_descs);
       /* Copy bits of that into rs_out. */
-      tor_assert(fast_memeq(lowest_id, rs->status.identity_digest, DIGEST_LEN));
+      tor_assert(fast_memeq(lowest_id, rs->status.identity_digest,DIGEST_LEN));
       memcpy(rs_out.identity_digest, lowest_id, DIGEST_LEN);
       memcpy(rs_out.descriptor_digest, rs->status.descriptor_digest,
              DIGEST_LEN);
index dcd8159aff44af003f281afece942d36b1119396..34d1e6ec980eb072c23a183223b1ebc50b289029 100644 (file)
@@ -1433,8 +1433,9 @@ networkstatus_set_current_consensus(const char *consensus, unsigned flags)
   }
 
   if (current_consensus &&
-      tor_memeq(c->networkstatus_digest, current_consensus->networkstatus_digest,
-              DIGEST_LEN)) {
+      tor_memeq(c->networkstatus_digest,
+                current_consensus->networkstatus_digest,
+                DIGEST_LEN)) {
     /* We already have this one. That's a failure. */
     log_info(LD_DIR, "Got a consensus we already have");
     goto done;
index 9f046209865734102608dcba50e637ea18731223..be7ba0e965ac6a786604563d07bbb1ef0d500f7e 100644 (file)
@@ -2008,8 +2008,8 @@ router_get_by_nickname(const char *nickname, int warn_if_unnamed)
       if (n_matches <= 1 || router->is_running)
         best_match = router;
     } else if (maybedigest &&
-               tor_memeq(digest, router->cache_info.identity_digest, DIGEST_LEN)
-               ) {
+               tor_memeq(digest, router->cache_info.identity_digest,
+                         DIGEST_LEN)) {
       if (router_hex_digest_matches(router, nickname))
         return router;
       /* If we reach this point, we have a ID=name syntax that matches the
@@ -4665,8 +4665,9 @@ routerinfo_incompatible_with_extrainfo(routerinfo_t *ri, extrainfo_t *ei,
 
   /* The identity must match exactly to have been generated at the same time
    * by the same router. */
-  if (tor_memneq(ri->cache_info.identity_digest, ei->cache_info.identity_digest,
-             DIGEST_LEN)) {
+  if (tor_memneq(ri->cache_info.identity_digest,
+                 ei->cache_info.identity_digest,
+                 DIGEST_LEN)) {
     if (msg) *msg = "Extrainfo nickname or identity did not match routerinfo";
     goto err; /* different servers */
   }