[Author Prev][Author Next][Thread Prev][Thread Next][Author Index][Thread Index]

[tor-commits] [tor/master] Turn DEFAULT_IF_MODIFIED_SINCE_DELAY into a const



commit a8eccb6363ff02d4c59526a4daace96f71ff01c8
Author: Nick Mathewson <nickm@xxxxxxxxxxxxxx>
Date:   Thu May 4 08:24:14 2017 -0400

    Turn DEFAULT_IF_MODIFIED_SINCE_DELAY into a const
---
 src/or/directory.c | 9 +++++----
 1 file changed, 5 insertions(+), 4 deletions(-)

diff --git a/src/or/directory.c b/src/or/directory.c
index bf963f1..1b37743 100644
--- a/src/or/directory.c
+++ b/src/or/directory.c
@@ -493,14 +493,15 @@ dir_consensus_request_set_additional_headers(directory_request_t *req,
   uint8_t or_diff_from[DIGEST256_LEN];
   int or_diff_from_is_set = 0;
 
+  /* DEFAULT_IF_MODIFIED_SINCE_DELAY is 1/20 of the default consensus
+   * period of 1 hour.
+   */
+  const int DEFAULT_IF_MODIFIED_SINCE_DELAY = 180;
+
   int flav = FLAV_NS;
   if (resource)
     flav = networkstatus_parse_flavor_name(resource);
 
-  /* DEFAULT_IF_MODIFIED_SINCE_DELAY is 1/20 of the default consensus
-   * period of 1 hour.
-   */
-#define DEFAULT_IF_MODIFIED_SINCE_DELAY (180)
   if (flav != -1) {
     /* IF we have a parsed consensus of this type, we can do an
      * if-modified-time based on it. */



_______________________________________________
tor-commits mailing list
tor-commits@xxxxxxxxxxxxxxxxxxxx
https://lists.torproject.org/cgi-bin/mailman/listinfo/tor-commits