diff options
author | Roman Mashak <mrv@mojatatu.com> | 2018-06-27 19:33:35 +0200 |
---|---|---|
committer | David S. Miller <davem@davemloft.net> | 2018-06-28 15:12:03 +0200 |
commit | 430527415398cf7e741f5e2f11324a8df9093327 (patch) | |
tree | d7cbc62cc51d27c8c85260fe7c232fcf0787c79a /net/sched | |
parent | net sched actions: fix misleading text strings in pedit action (diff) | |
download | linux-430527415398cf7e741f5e2f11324a8df9093327.tar.xz linux-430527415398cf7e741f5e2f11324a8df9093327.zip |
net sched actions: avoid bitwise operation on signed value in pedit
Since char can be unsigned or signed, and bitwise operators may have
implementation-dependent results when performed on signed operands,
declare 'u8 *' operand instead.
Suggested-by: Davide Caratti <dcaratti@redhat.com>
Signed-off-by: Roman Mashak <mrv@mojatatu.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
Diffstat (limited to 'net/sched')
-rw-r--r-- | net/sched/act_pedit.c | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/net/sched/act_pedit.c b/net/sched/act_pedit.c index caa6927a992c..ab151346d3d4 100644 --- a/net/sched/act_pedit.c +++ b/net/sched/act_pedit.c @@ -311,7 +311,7 @@ static int tcf_pedit(struct sk_buff *skb, const struct tc_action *a, } if (tkey->offmask) { - char *d, _d; + u8 *d, _d; if (!offset_valid(skb, hoffset + tkey->at)) { pr_info("tc action pedit 'at' offset %d out of bounds\n", |