summaryrefslogtreecommitdiffstats
path: root/net/sched
diff options
context:
space:
mode:
authorRoman Mashak <mrv@mojatatu.com>2018-06-27 19:33:35 +0200
committerDavid S. Miller <davem@davemloft.net>2018-06-28 15:12:03 +0200
commit430527415398cf7e741f5e2f11324a8df9093327 (patch)
treed7cbc62cc51d27c8c85260fe7c232fcf0787c79a /net/sched
parentnet sched actions: fix misleading text strings in pedit action (diff)
downloadlinux-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.c2
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",