]> git.ipfire.org Git - thirdparty/tor.git/commitdiff
Search-and-replace to regain coding style in wake of 13822.
authorNick Mathewson <nickm@torproject.org>
Sat, 7 Feb 2015 13:32:04 +0000 (08:32 -0500)
committerNick Mathewson <nickm@torproject.org>
Sat, 7 Feb 2015 13:33:36 +0000 (08:33 -0500)
(all-caps should be reserved for global or module-global constants and

src/or/config.c

index 144499e00cb7d9c94d5d2138572d9d44a1e2cc64..c21c96684328fef9433286b070107339da6b01a8 100644 (file)
@@ -3180,34 +3180,34 @@ options_validate(or_options_t *old_options, or_options_t *options,
     options->RelayBandwidthRate = options->RelayBandwidthBurst;
 
   if (server_mode(options)) {
-    const unsigned ROUTER_REQUIRED_MIN_BANDWIDTH = // tolower XXXX
+    const unsigned required_min_bw =
       public_server_mode(options) ?
        RELAY_REQUIRED_MIN_BANDWIDTH : BRIDGE_REQUIRED_MIN_BANDWIDTH;
     const char * const optbridge =
       public_server_mode(options) ? "" : "bridge ";
-    if (options->BandwidthRate < ROUTER_REQUIRED_MIN_BANDWIDTH) {
+    if (options->BandwidthRate < required_min_bw) {
       tor_asprintf(msg,
                        "BandwidthRate is set to %d bytes/second. "
                        "For %sservers, it must be at least %u.",
                        (int)options->BandwidthRate, optbridge,
-                       ROUTER_REQUIRED_MIN_BANDWIDTH);
+                       required_min_bw);
       return -1;
     } else if (options->MaxAdvertisedBandwidth <
-               ROUTER_REQUIRED_MIN_BANDWIDTH/2) {
+               required_min_bw/2) {
       tor_asprintf(msg,
                        "MaxAdvertisedBandwidth is set to %d bytes/second. "
                        "For %sservers, it must be at least %u.",
                        (int)options->MaxAdvertisedBandwidth, optbridge,
-                       ROUTER_REQUIRED_MIN_BANDWIDTH/2);
+                       required_min_bw/2);
       return -1;
     }
     if (options->RelayBandwidthRate &&
-      options->RelayBandwidthRate < ROUTER_REQUIRED_MIN_BANDWIDTH) {
+      options->RelayBandwidthRate < required_min_bw) {
       tor_asprintf(msg,
                        "RelayBandwidthRate is set to %d bytes/second. "
                        "For %sservers, it must be at least %u.",
                        (int)options->RelayBandwidthRate, optbridge,
-                       ROUTER_REQUIRED_MIN_BANDWIDTH);
+                       required_min_bw);
       return -1;
     }
   }