]> git.ipfire.org Git - thirdparty/tor.git/commitdiff
Fix most check-spaces issues
authorNick Mathewson <nickm@torproject.org>
Thu, 16 Jul 2015 15:10:14 +0000 (11:10 -0400)
committerNick Mathewson <nickm@torproject.org>
Thu, 16 Jul 2015 15:10:14 +0000 (11:10 -0400)
src/common/compat.c
src/common/crypto_curve25519.c
src/common/util.c
src/or/config.c
src/or/rendcache.c
src/or/rendcache.h
src/or/routerkeys.c
src/or/routerparse.c
src/test/test_crypto_slow.c

index 07f011d63d814d61b62b0049d98e46113d7206d9..4930c05c2ac4bcebbb25afeb0df01c53553f7c1b 100644 (file)
@@ -80,7 +80,8 @@ wint_t _getwch(void);
 #define WEOF (wchar_t)(0xFFFF)
 #endif
 #if defined(HAVE_DECL_SECUREZEROMEMORY) && !HAVE_DECL_SECUREZEROMEMORY
-static inline void SecureZeroMemory(PVOID ptr, SIZE_T cnt)
+static inline void
+SecureZeroMemory(PVOID ptr, SIZE_T cnt)
 {
   volatile char *vcptr = (volatile char*)ptr;
   while (cnt--)
@@ -3378,3 +3379,4 @@ tor_getpass(const char *prompt, char *output, size_t buflen)
 #error "No implementation for tor_getpass found!"
 #endif
 }
+
index 113ac89df7ed771638b33c2f2114af55de7abe52..043782423f4e2a0eed58a582b6df509e4a69af6d 100644 (file)
@@ -353,7 +353,7 @@ curve25519_basepoint_spot_check(void)
 
   /* Check the most basic possible sanity via the test secret/public key pair
    * used in "Cryptography in NaCl - 2. Secret keys and public keys".  This
-   * may catch catastrophic failures on systems where Curve25519 is expensive, 
+   * may catch catastrophic failures on systems where Curve25519 is expensive,
    * without requiring a ton of key generation.
    */
   curve25519_use_ed = 1;
index 1849613512890cc18899f6aef5f6caba7c5cf9af..a5b5488b0ac9fdb635eef7760d44fda44e096fb2 100644 (file)
@@ -2561,7 +2561,7 @@ read_file_to_str_until_eof(int fd, size_t max_bytes_to_read, size_t *sz_out)
   size_t string_max = 0;
 
   if (max_bytes_to_read+1 >= SIZE_T_CEILING) {
-    errno = EINVAL; 
+    errno = EINVAL;
     return NULL;
   }
 
index bd74db6097e1641fc95746cf4bc3b1af84784894..2f656647e72340db1118bc7ae8976f1a309b1130 100644 (file)
@@ -2591,7 +2591,6 @@ options_validate_cb(void *old_options, void *options, void *default_options,
   STMT_BEGIN log_warn(LD_CONFIG, args, ##__VA_ARGS__); STMT_END
 #endif
 
-
 /** Log a warning message iff <b>filepath</b> is not absolute.
  * Warning message must contain option name <b>option</b> and
  * an absolute path that <b>filepath<b> will resolve to.
index 37d3f12f9d261b8403bf4cc39bdfe13fadabdde1..be94ef444531d539dc4878a356a36374d8c62cc9 100644 (file)
@@ -237,7 +237,7 @@ rend_cache_lookup_entry(const char *query, int version, rend_cache_entry_t **e)
     *e = entry;
   }
 
-end:
+ end:
   return ret;
 }
 
@@ -374,9 +374,9 @@ rend_cache_store_v2_desc_as_dir(const char *desc)
 
     number_stored++;
     goto advance;
-skip:
+ skip:
     rend_service_descriptor_free(parsed);
-advance:
+ advance:
     /* advance to next descriptor, if available. */
     current_desc = next_desc;
     /* check if there is a next descriptor. */
@@ -566,14 +566,15 @@ rend_cache_store_v2_desc_as_client(const char *desc,
   }
   return RCS_OKAY;
 
-okay:
+ okay:
   if (entry) {
     *entry = e;
   }
   retval = RCS_OKAY;
 
-err:
+ err:
   rend_service_descriptor_free(parsed);
   tor_free(intro_content);
   return retval;
 }
+
index f34f599e63824602426daba1117dbd95302c1e7e..f33ea662f5b6972843b394f8f682b734f0709313 100644 (file)
@@ -54,3 +54,4 @@ rend_cache_store_status_t rend_cache_store_v2_desc_as_client(const char *desc,
 size_t rend_cache_get_total_allocation(void);
 
 #endif /* TOR_RENDCACHE_H */
+
index 955cb9ce23103f0f08a2ec8d125470c47a8db1d8..47a6c89534f36048651c60941f9c71b7d77bc0aa 100644 (file)
@@ -61,7 +61,6 @@ read_encrypted_secret_key(ed25519_secret_key_t *out,
      * it right. */
   }
 
-
   if (secret_len != ED25519_SECKEY_LEN) {
     log_err(LD_OR, "%s is corrupted.", fname);
     saved_errno = EINVAL;
index 3904671d019ff2694e7c58bbceb8b729b32d861b..c2206f10753388e498a05e41f2b50716e7818474 100644 (file)
@@ -4498,7 +4498,6 @@ microdescs_parse_from_string(const char *s, const char *eos,
       }
     }
 
-
     if (tokenize_string(area, s, start_of_next_microdesc, tokens,
                         microdesc_token_table, flags)) {
       log_warn(LD_DIR, "Unparseable microdescriptor");
index 2bd76f2cae4d11c49350f5d8b8e4fe44674bce65..8d6787adbdd0ed3137368c0dafdcb0d70c4425ab 100644 (file)
@@ -172,8 +172,8 @@ test_libscrypt_eq_openssl(void *arg)
   p = 16;
 
   libscrypt_retval =
-  libscrypt_scrypt((const uint8_t *)"password", 0, 
-                   (const uint8_t *)"NaCl", 0, 
+  libscrypt_scrypt((const uint8_t *)"password", 0,
+                   (const uint8_t *)"NaCl", 0,
                    r, N, p, buf1, dk_len);
   openssl_retval =
   EVP_PBE_scrypt((const char *)"password", 0,
@@ -211,10 +211,10 @@ test_libscrypt_eq_openssl(void *arg)
   memset(buf2,0,64);
 
   r = 1048576;
+
   libscrypt_retval =
-  libscrypt_scrypt((const uint8_t *)"pleaseletmein", 0, 
-                   (const uint8_t *)"SodiumChloride", 0, 
+  libscrypt_scrypt((const uint8_t *)"pleaseletmein", 0,
+                   (const uint8_t *)"SodiumChloride", 0,
                    N, r, p, buf1, dk_len);
   openssl_retval =
   EVP_PBE_scrypt((const char *)"pleaseletmein", 0,