Skip to content

Commit

Permalink
Avoid undefined shift.
Browse files Browse the repository at this point in the history
  • Loading branch information
JanWielemaker committed May 15, 2024
1 parent b2c28e5 commit ebed654
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions src/pl-trie.c
Original file line number Diff line number Diff line change
Expand Up @@ -538,7 +538,7 @@ prune_trie(trie *trie, trie_node *root,


#define VMASKBITS (sizeof(unsigned)*8)
#define VMASK_SCAN (0x1<<(VMASKBITS-1))
#define VMASK_SCAN (0x1U<<(VMASKBITS-1))

static inline void
update_var_mask(trie_children_hashed *hnode, word key)
Expand All @@ -547,7 +547,7 @@ update_var_mask(trie_children_hashed *hnode, word key)
unsigned mask;

if ( vn < VMASKBITS )
mask = 0x1<<(vn-1);
mask = 0x1U<<(vn-1);
else
mask = VMASK_SCAN;

Expand Down

0 comments on commit ebed654

Please sign in to comment.