From 9b422c443e8575b94719a8735354e910b52ff91d Mon Sep 17 00:00:00 2001 From: Victor Julien Date: Thu, 31 Dec 2009 19:02:19 +0100 Subject: [PATCH] Fix up initialization and hopefully make the SEQ macro's fix up an 64bit issue we're seeing... --- src/stream-tcp-private.h | 10 +++++----- src/stream-tcp.c | 2 +- 2 files changed, 6 insertions(+), 6 deletions(-) diff --git a/src/stream-tcp-private.h b/src/stream-tcp-private.h index f1a462c06d..4232999cd5 100644 --- a/src/stream-tcp-private.h +++ b/src/stream-tcp-private.h @@ -73,11 +73,11 @@ enum /* Macro's for comparing Sequence numbers * Page 810 from TCP/IP Illustrated, Volume 2. */ -#define SEQ_EQ(a,b) ((int)((a) - (b)) == 0) -#define SEQ_LT(a,b) ((int)((a) - (b)) < 0) -#define SEQ_LEQ(a,b) ((int)((a) - (b)) <= 0) -#define SEQ_GT(a,b) ((int)((a) - (b)) > 0) -#define SEQ_GEQ(a,b) ((int)((a) - (b)) >= 0) +#define SEQ_EQ(a,b) ((int32_t)((a) - (b)) == 0) +#define SEQ_LT(a,b) ((int32_t)((a) - (b)) < 0) +#define SEQ_LEQ(a,b) ((int32_t)((a) - (b)) <= 0) +#define SEQ_GT(a,b) ((int32_t)((a) - (b)) > 0) +#define SEQ_GEQ(a,b) ((int32_t)((a) - (b)) >= 0) typedef struct TcpSession_ { uint8_t state; diff --git a/src/stream-tcp.c b/src/stream-tcp.c index 511995b53b..68acac9302 100644 --- a/src/stream-tcp.c +++ b/src/stream-tcp.c @@ -76,7 +76,7 @@ static Pool *ssn_pool = NULL; static SCMutex ssn_pool_mutex; #ifdef DEBUG -static uint64_t ssn_pool_cnt; +static uint64_t ssn_pool_cnt = 0; static SCMutex ssn_pool_cnt_mutex; #endif