Fix more missing casts to uint in rule-engine

pull/132/head
jsteube 8 years ago
parent 497b41fee4
commit 76612ac031

@ -2008,7 +2008,7 @@ static u32 rule_op_mangle_toggle_at (const u32 p0, const u32 p1, u32 buf0[4], u3
{
if (p0 >= in_len) return (in_len);
const u32 tmp = 0x20 << ((p0 & 3) * 8);
const u32 tmp = 0x20u << ((p0 & 3) * 8);
switch (p0 / 4)
{
@ -2477,7 +2477,7 @@ static u32 rule_op_mangle_overstrike (const u32 p0, const u32 p1, u32 buf0[4], u
const u32 p1n = p1 << ((p0 & 3) * 8);
const u32 m = ~(0xff << ((p0 & 3) * 8));
const u32 m = ~(0xffu << ((p0 & 3) * 8));
switch (p0 / 4)
{
@ -3734,7 +3734,7 @@ static u32 rule_op_mangle_chr_shiftl (const u32 p0, const u32 p1, u32 buf0[4], u
{
if (p0 >= in_len) return (in_len);
const u32 mr = 0xff << ((p0 & 3) * 8);
const u32 mr = 0xffu << ((p0 & 3) * 8);
const u32 ml = ~mr;
switch (p0 / 4)
@ -3756,7 +3756,7 @@ static u32 rule_op_mangle_chr_shiftr (const u32 p0, const u32 p1, u32 buf0[4], u
{
if (p0 >= in_len) return (in_len);
const u32 mr = 0xff << ((p0 & 3) * 8);
const u32 mr = 0xffu << ((p0 & 3) * 8);
const u32 ml = ~mr;
switch (p0 / 4)
@ -3778,7 +3778,7 @@ static u32 rule_op_mangle_chr_incr (const u32 p0, const u32 p1, u32 buf0[4], u32
{
if (p0 >= in_len) return (in_len);
const u32 mr = 0xff << ((p0 & 3) * 8);
const u32 mr = 0xffu << ((p0 & 3) * 8);
const u32 ml = ~mr;
const u32 n = 0x01010101 & mr;
@ -3802,7 +3802,7 @@ static u32 rule_op_mangle_chr_decr (const u32 p0, const u32 p1, u32 buf0[4], u32
{
if (p0 >= in_len) return (in_len);
const u32 mr = 0xff << ((p0 & 3) * 8);
const u32 mr = 0xffu << ((p0 & 3) * 8);
const u32 ml = ~mr;
const u32 n = 0x01010101 & mr;
@ -3831,7 +3831,7 @@ static u32 rule_op_mangle_replace_np1 (const u32 p0, const u32 p1, u32 buf0[4],
lshift_block (buf0, buf1, tib40, tib41);
const u32 mr = 0xff << ((p0 & 3) * 8);
const u32 mr = 0xffu << ((p0 & 3) * 8);
const u32 ml = ~mr;
switch (p0 / 4)
@ -3860,7 +3860,7 @@ static u32 rule_op_mangle_replace_nm1 (const u32 p0, const u32 p1, u32 buf0[4],
rshift_block (buf0, buf1, tib40, tib41);
const u32 mr = 0xff << ((p0 & 3) * 8);
const u32 mr = 0xffu << ((p0 & 3) * 8);
const u32 ml = ~mr;
switch (p0 / 4)

@ -13,7 +13,7 @@
static uint32_t generate_cmask (uint32_t buf)
{
const uint32_t rmask = ((buf & 0x40404040) >> 1)
& ~((buf & 0x80808080) >> 2);
& ~((buf & 0x80808080) >> 2);
const uint32_t hmask = (buf & 0x1f1f1f1f) + 0x05050505;
const uint32_t lmask = (buf & 0x1f1f1f1f) + 0x1f1f1f1f;
@ -1126,7 +1126,7 @@ static uint rule_op_mangle_toggle_at (const uint p0, const uint p1, uint32_t buf
{
if (p0 >= in_len) return (in_len);
const uint tmp = 0x20 << ((p0 & 3) * 8);
const uint tmp = 0x20u << ((p0 & 3) * 8);
switch (p0 / 4)
{
@ -1595,7 +1595,7 @@ static uint rule_op_mangle_overstrike (const uint p0, const uint p1, uint32_t bu
const uint p1n = p1 << ((p0 & 3) * 8);
const uint m = ~(0xff << ((p0 & 3) * 8));
const uint m = ~(0xffu << ((p0 & 3) * 8));
switch (p0 / 4)
{
@ -2277,7 +2277,7 @@ static uint rule_op_mangle_chr_shiftl (const uint p0, const uint p1, uint32_t bu
{
if (p0 >= in_len) return (in_len);
const uint mr = 0xff << ((p0 & 3) * 8);
const uint mr = 0xffu << ((p0 & 3) * 8);
const uint ml = ~mr;
switch (p0 / 4)
@ -2299,7 +2299,7 @@ static uint rule_op_mangle_chr_shiftr (const uint p0, const uint p1, uint32_t bu
{
if (p0 >= in_len) return (in_len);
const uint mr = 0xff << ((p0 & 3) * 8);
const uint mr = 0xffu << ((p0 & 3) * 8);
const uint ml = ~mr;
switch (p0 / 4)
@ -2321,7 +2321,7 @@ static uint rule_op_mangle_chr_incr (const uint p0, const uint p1, uint32_t buf0
{
if (p0 >= in_len) return (in_len);
const uint mr = 0xff << ((p0 & 3) * 8);
const uint mr = 0xffu << ((p0 & 3) * 8);
const uint ml = ~mr;
const uint n = 0x01010101 & mr;
@ -2345,7 +2345,7 @@ static uint rule_op_mangle_chr_decr (const uint p0, const uint p1, uint32_t buf0
{
if (p0 >= in_len) return (in_len);
const uint mr = 0xff << ((p0 & 3) * 8);
const uint mr = 0xffu << ((p0 & 3) * 8);
const uint ml = ~mr;
const uint n = 0x01010101 & mr;
@ -2374,7 +2374,7 @@ static uint rule_op_mangle_replace_np1 (const uint p0, const uint p1, uint32_t b
lshift_block (buf0, buf1, tib40, tib41);
const uint mr = 0xff << ((p0 & 3) * 8);
const uint mr = 0xffu << ((p0 & 3) * 8);
const uint ml = ~mr;
switch (p0 / 4)
@ -2403,7 +2403,7 @@ static uint rule_op_mangle_replace_nm1 (const uint p0, const uint p1, uint32_t b
rshift_block (buf0, buf1, tib40, tib41);
const uint mr = 0xff << ((p0 & 3) * 8);
const uint mr = 0xffu << ((p0 & 3) * 8);
const uint ml = ~mr;
switch (p0 / 4)

Loading…
Cancel
Save