diff options
author | Roman Mashak <mrv@mojatatu.com> | 2018-06-27 20:33:35 +0300 |
---|---|---|
committer | David S. Miller <davem@davemloft.net> | 2018-06-28 16:12:03 +0300 |
commit | 430527415398cf7e741f5e2f11324a8df9093327 (patch) | |
tree | d7cbc62cc51d27c8c85260fe7c232fcf0787c79a | |
parent | 95b0d2dc13c7e7ea51675836680732e8c16e378a (diff) | |
download | linux-430527415398cf7e741f5e2f11324a8df9093327.tar.xz |
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>
-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", |