From 4a8aed08c72d7ea444e430c4023960ab28e559cd Mon Sep 17 00:00:00 2001 From: Ian Jackson Date: Sun, 19 Jun 2011 16:25:26 +0100 Subject: [PATCH] integer arithmetic types: do not use unsigned for site timeouts etc. Signed-off-by: Ian Jackson --- hackypar.c | 4 ++-- hackypar.h | 2 +- site.c | 10 +++++----- 3 files changed, 8 insertions(+), 8 deletions(-) diff --git a/hackypar.c b/hackypar.c index 5c5cd3d..31ef145 100644 --- a/hackypar.c +++ b/hackypar.c @@ -79,7 +79,7 @@ int hacky_par_mid_failnow(void) { bool_t (*packy_par_gen)(struct site *st); void hacky_par_end(int *ok, - int32_t retries, uint32_t timeout, + int32_t retries, int32_t timeout, bool_t (*send_msg)(struct site *st), struct site *st) { int i; @@ -115,7 +115,7 @@ void hacky_par_end(int *ok, int hacky_par_start_failnow(void) { return 0; } int hacky_par_mid_failnow(void) { return 0; } void hacky_par_end(int *ok, - int32_t retries, uint32_t timeout, + int32_t retries, int32_t timeout, bool_t (*send_msg)(struct site *st), struct site *st) { } #endif /*HACKY_PARALLEL...else*/ diff --git a/hackypar.h b/hackypar.h index c22176f..f47493e 100644 --- a/hackypar.h +++ b/hackypar.h @@ -11,7 +11,7 @@ struct site; int hacky_par_start_failnow(void); int hacky_par_mid_failnow(void); void hacky_par_end(int *ok, - int32_t retries, uint32_t timeout, + int32_t retries, int32_t timeout, bool_t (*send_msg)(struct site *st), struct site *st); #endif /* hackympzpar_h */ diff --git a/site.c b/site.c index d77716e..f3312db 100644 --- a/site.c +++ b/site.c @@ -146,10 +146,10 @@ struct site { struct hash_if *hash; int32_t setup_retries; /* How many times to send setup packets */ - uint32_t setup_timeout; /* Initial timeout for setup packets */ - uint32_t wait_timeout; /* How long to wait if setup unsuccessful */ - uint32_t key_lifetime; /* How long a key lasts once set up */ - uint32_t key_renegotiate_time; /* If we see traffic (or a keepalive) + int32_t setup_timeout; /* Initial timeout for setup packets */ + int32_t wait_timeout; /* How long to wait if setup unsuccessful */ + int32_t key_lifetime; /* How long a key lasts once set up */ + int32_t key_renegotiate_time; /* If we see traffic (or a keepalive) after this time, initiate a new key exchange */ bool_t keepalive; /* Send keepalives to detect peer failure (not yet @@ -187,7 +187,7 @@ struct site { uint8_t localN[NONCELEN]; /* Nonces for key exchange */ uint8_t remoteN[NONCELEN]; struct buffer_if buffer; /* Current outgoing key exchange packet */ - uint32_t retries; /* Number of retries remaining */ + int32_t retries; /* Number of retries remaining */ uint64_t timeout; /* Timeout for current state */ uint8_t *dhsecret; uint8_t *sharedsecret; -- 2.30.2