提交 c03571a3 编写于 作者: S Stephen Hemminger 提交者: Jeff Garzik

via-velocity: use memmove

Use memmove to handle overlapping copy of data.
Signed-off-by: NStephen Hemminger <shemminger@vyatta.com>
Signed-off-by: NJeff Garzik <jgarzik@redhat.com>
上级 c73d2589
...@@ -1527,12 +1527,8 @@ static int velocity_rx_copy(struct sk_buff **rx_skb, int pkt_size, ...@@ -1527,12 +1527,8 @@ static int velocity_rx_copy(struct sk_buff **rx_skb, int pkt_size,
static inline void velocity_iph_realign(struct velocity_info *vptr, static inline void velocity_iph_realign(struct velocity_info *vptr,
struct sk_buff *skb, int pkt_size) struct sk_buff *skb, int pkt_size)
{ {
/* FIXME - memmove ? */
if (vptr->flags & VELOCITY_FLAGS_IP_ALIGN) { if (vptr->flags & VELOCITY_FLAGS_IP_ALIGN) {
int i; memmove(skb->data + 2, skb->data, pkt_size);
for (i = pkt_size; i >= 0; i--)
*(skb->data + i + 2) = *(skb->data + i);
skb_reserve(skb, 2); skb_reserve(skb, 2);
} }
} }
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册