Skip to content

Commit

Permalink
Fix the number of items in the collation union
Browse files Browse the repository at this point in the history
This doesn't change anything except make the code more clear since the
union never overflowed because C allocates the largest item in the
union. It does make the code clearer and make much more sense though.
Issue detected by coverity.
  • Loading branch information
samcv committed May 30, 2018
1 parent 4708018 commit 586950b
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions src/strings/unicode_ops.c
Original file line number Diff line number Diff line change
Expand Up @@ -60,15 +60,15 @@ struct level_eval_s2 {
MVMint32 Less, Same, More;
};
union level_eval_u2 {
MVMint32 a2[4];
MVMint32 a2[3];
struct level_eval_s2 s2;
};
struct level_eval_s {
union level_eval_u2 primary, secondary, tertiary, quaternary;
};
union level_eval_u {
struct level_eval_s s;
union level_eval_u2 a[3];
union level_eval_u2 a[4];
};
typedef union level_eval_u level_eval;
#define initial_stack_size 100
Expand Down

0 comments on commit 586950b

Please sign in to comment.