[tor-commits] [metrics-web/release] Inline redundant local variables.

karsten at torproject.org karsten at torproject.org
Wed Sep 26 15:20:35 UTC 2018


commit e04eec7cb742efb5348925524d9a37d5d0a66a7a
Author: Karsten Loesing <karsten.loesing at gmx.net>
Date:   Tue Aug 21 14:09:58 2018 +0200

    Inline redundant local variables.
---
 src/main/java/org/torproject/metrics/stats/hidserv/Parser.java | 4 +---
 1 file changed, 1 insertion(+), 3 deletions(-)

diff --git a/src/main/java/org/torproject/metrics/stats/hidserv/Parser.java b/src/main/java/org/torproject/metrics/stats/hidserv/Parser.java
index 5970e32..558ce39 100644
--- a/src/main/java/org/torproject/metrics/stats/hidserv/Parser.java
+++ b/src/main/java/org/torproject/metrics/stats/hidserv/Parser.java
@@ -241,9 +241,7 @@ public class Parser {
   private long removeNoise(long reportedNumber, long binSize) {
     long roundedToNearestRightSideOfTheBin =
         Math.floorDiv((reportedNumber + binSize / 2), binSize) * binSize;
-    long subtractedHalfOfBinSize =
-        roundedToNearestRightSideOfTheBin - binSize / 2;
-    return subtractedHalfOfBinSize;
+    return roundedToNearestRightSideOfTheBin - binSize / 2;
   }
 
   /** Parses the given consensus. */





More information about the tor-commits mailing list