The following commit has been merged in the master branch: commit 68de139f9087a9ba1d1954046e6a91cbd45b7b4d Author: Simon Wunderlich siwu@hrz.tu-chemnitz.de Date: Thu Jan 25 21:27:07 2007 +0100
- change a few unsigned shorts to uint16_t
diff --git a/batman.h b/batman.h index 901b715..5f84dbb 100644 --- a/batman.h +++ b/batman.h @@ -102,7 +102,7 @@ struct orig_node /* structure for orig_list maintaining nodes of unsigned char gwflags; /* flags related to gateway functions: gateway class */ unsigned char *hna_buff; int hna_buff_len; - unsigned short last_seqno; /* last known squence number */ + uint16_t last_seqno; /* last known squence number */ struct list_head neigh_list; };
@@ -205,7 +205,7 @@ void del_default_route(); int add_default_route();
void bit_init( TYPE_OF_WORD *seq_bits ); -int get_bit_status( TYPE_OF_WORD *seq_bits, unsigned short last_seqno, unsigned short curr_seqno ); +int get_bit_status( TYPE_OF_WORD *seq_bits, uint16_t last_seqno, uint16_t curr_seqno ); char* bit_print( TYPE_OF_WORD *seq_bits ); void bit_mark( TYPE_OF_WORD *seq_bits, int n ); void bit_shift( TYPE_OF_WORD *seq_bits, int n ); diff --git a/bitarray.c b/bitarray.c index 7b1ee41..a98e9d4 100644 --- a/bitarray.c +++ b/bitarray.c @@ -37,7 +37,7 @@ void bit_init( TYPE_OF_WORD *seq_bits ) { };
/* returns true if corresponding bit in given seq_bits indicates so and curr_seqno is within range of last_seqno */ -int get_bit_status( TYPE_OF_WORD *seq_bits, unsigned short last_seqno, unsigned short curr_seqno ) { +int get_bit_status( TYPE_OF_WORD *seq_bits, uint16_t last_seqno, uint16_t curr_seqno ) {
int word_offset,word_num; //TBD: not shure for wrap arounds, what about: if ( curr_seqno - last_seqno > 0 || curr_seqno - last_seqno <