@@ -98,7 +98,7 @@ static int em_canid_match(struct sk_buff *skb, struct tcf_ematch *m,
{
struct canid_match *cm = em_canid_priv(m);
canid_t can_id;
- int match = false;
+ int match = 0;
int i;
const struct can_filter *lp;
@@ -108,19 +108,16 @@ static int em_canid_match(struct sk_buff *skb, struct tcf_ematch *m,
for (i = 0, lp = cm->rules_raw;
i < cm->eff_rules_count; i++, lp++) {
if (!(((lp->can_id ^ can_id) & lp->can_mask))) {
- match = true;
+ match = 1;
break;
}
}
} else { /* SFF */
can_id &= CAN_SFF_MASK;
- match = test_bit(can_id, cm->match_sff);
+ match = (test_bit(can_id, cm->match_sff))?1:0;
}
- if (match)
- return 1;
-
- return 0;
+ return match;
}
static int em_canid_change(struct tcf_proto *tp, void *data, int len,