Skip to content

Commit

Permalink
[pua] force pres_id a unsigned_int during calculation
Browse files Browse the repository at this point in the history
To avoid any issues due to "singed" overflowing
  • Loading branch information
bogdan-iancu committed Jan 23, 2023
1 parent ed8bf4d commit ac99224
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion modules/pua/hash.h
Original file line number Diff line number Diff line change
Expand Up @@ -63,7 +63,7 @@
#define MAX_FORWARD 70

#define PRES_HASH_ID(presentity) \
(HASH_SIZE*(long)presentity->local_index + presentity->hash_index)
(unsigned long)(HASH_SIZE*(unsigned long)presentity->local_index + presentity->hash_index)

typedef struct publ
{
Expand Down

0 comments on commit ac99224

Please sign in to comment.