diff options
Diffstat (limited to 'src')
-rw-r--r-- | src/common/compat.h | 3 | ||||
-rw-r--r-- | src/or/onion_fast.h | 2 | ||||
-rw-r--r-- | src/or/or.h | 4 | ||||
-rw-r--r-- | src/or/rendservice.c | 2 | ||||
-rw-r--r-- | src/or/rephist.c | 2 | ||||
-rw-r--r-- | src/win32/orconfig.h | 1 |
6 files changed, 7 insertions, 7 deletions
diff --git a/src/common/compat.h b/src/common/compat.h index 036acfba71..f9eb4ba0be 100644 --- a/src/common/compat.h +++ b/src/common/compat.h @@ -136,8 +136,7 @@ extern INLINE double U64_TO_DBL(uint64_t x) { #define DBL_TO_U64(x) ((uint64_t) (x)) #endif -#if defined(_MSC_VER) -/* XXXX024 we should instead have a more general check for "Is enum signed?"*/ +#ifdef ENUM_VALS_ARE_SIGNED #define ENUM_BF(t) unsigned #else /** Wrapper for having a bitfield of an enumerated type. Where possible, we diff --git a/src/or/onion_fast.h b/src/or/onion_fast.h index 0c2a475376..8c078378d2 100644 --- a/src/or/onion_fast.h +++ b/src/or/onion_fast.h @@ -13,7 +13,7 @@ #define TOR_ONION_FAST_H #define CREATE_FAST_LEN DIGEST_LEN -#define CREATED_FAST_LEN DIGEST_LEN*2 +#define CREATED_FAST_LEN (DIGEST_LEN*2) typedef struct fast_handshake_state_t { uint8_t state[DIGEST_LEN]; diff --git a/src/or/or.h b/src/or/or.h index a0a921a9f4..04640d050a 100644 --- a/src/or/or.h +++ b/src/or/or.h @@ -4586,12 +4586,12 @@ typedef struct rend_encoded_v2_service_descriptor_t { * sooner.) * * XXX023 Should this be configurable? */ -#define INTRO_POINT_LIFETIME_MIN_SECONDS 18*60*60 +#define INTRO_POINT_LIFETIME_MIN_SECONDS (18*60*60) /** The maximum number of seconds that an introduction point will last * before expiring due to old age. * * XXX023 Should this be configurable? */ -#define INTRO_POINT_LIFETIME_MAX_SECONDS 24*60*60 +#define INTRO_POINT_LIFETIME_MAX_SECONDS (24*60*60) /** Introduction point information. Used both in rend_service_t (on * the service side) and in rend_service_descriptor_t (on both the diff --git a/src/or/rendservice.c b/src/or/rendservice.c index f85ac2c03b..10d232c039 100644 --- a/src/or/rendservice.c +++ b/src/or/rendservice.c @@ -88,7 +88,7 @@ typedef struct rend_service_port_config_t { /** How many seconds should we wait for new HS descriptors to reach * our clients before we close an expiring intro point? */ -#define INTRO_POINT_EXPIRATION_GRACE_PERIOD 5*60 +#define INTRO_POINT_EXPIRATION_GRACE_PERIOD (5*60) /** Represents a single hidden service running at this OP. */ typedef struct rend_service_t { diff --git a/src/or/rephist.c b/src/or/rephist.c index 34caa4b518..1bee6459cc 100644 --- a/src/or/rephist.c +++ b/src/or/rephist.c @@ -1549,7 +1549,7 @@ rep_hist_get_bandwidth_lines(void) /* [dirreq-](read|write)-history yyyy-mm-dd HH:MM:SS (n s) n,n,n... */ /* The n,n,n part above. Largest representation of a uint64_t is 20 chars * long, plus the comma. */ -#define MAX_HIST_VALUE_LEN 21*NUM_TOTALS +#define MAX_HIST_VALUE_LEN (21*NUM_TOTALS) len = (67+MAX_HIST_VALUE_LEN)*4; buf = tor_malloc_zero(len); cp = buf; diff --git a/src/win32/orconfig.h b/src/win32/orconfig.h index 4312d9fbe5..f5d5cf4460 100644 --- a/src/win32/orconfig.h +++ b/src/win32/orconfig.h @@ -256,3 +256,4 @@ #define CURVE25519_ENABLED #define USE_CURVE25519_DONNA +#define ENUM_VALS_ARE_SIGNED 1 |