diff options
author | Karsten Loesing <karsten.loesing@gmx.net> | 2009-07-13 22:43:06 +0200 |
---|---|---|
committer | Karsten Loesing <karsten.loesing@gmx.net> | 2009-07-13 22:43:06 +0200 |
commit | 8f1a973669284e5662bd6f23bc96ecfafa57c554 (patch) | |
tree | f8145dc47dee99bc85814d3bac2056a8c134e51a /src/or/or.h | |
parent | 707a44a7b0e12f9aef541dd69b356e2f123bcda8 (diff) | |
download | tor-8f1a973669284e5662bd6f23bc96ecfafa57c554.tar.gz tor-8f1a973669284e5662bd6f23bc96ecfafa57c554.zip |
Two tweaks to exit-port statistics.
Add two functions for round_to_next_multiple_of() for uint32_t and
uint64_t.
Avoid division in every step of the loop over all ports.
Diffstat (limited to 'src/or/or.h')
-rw-r--r-- | src/or/or.h | 10 |
1 files changed, 0 insertions, 10 deletions
diff --git a/src/or/or.h b/src/or/or.h index be38035af7..f298d53c27 100644 --- a/src/or/or.h +++ b/src/or/or.h @@ -2669,16 +2669,6 @@ struct socks_request_t { * every connection. */ }; -/** Return the lowest x such that x is at least <b>number</b>, and x modulo - * <b>divisor</b> == 0. */ -static INLINE unsigned -round_to_next_multiple_of(unsigned number, unsigned divisor) -{ - number += divisor - 1; - number -= number % divisor; - return number; -} - /* all the function prototypes go here */ /********************************* buffers.c ***************************/ |