Skip to content

Commit

Permalink
via-velocity: use memmove
Browse files Browse the repository at this point in the history
Use memmove to handle overlapping copy of data.

Signed-off-by: Stephen Hemminger <shemminger@vyatta.com>
Signed-off-by: Jeff Garzik <jgarzik@redhat.com>
  • Loading branch information
Stephen Hemminger authored and Jeff Garzik committed May 22, 2008
1 parent c73d258 commit c03571a
Showing 1 changed file with 1 addition and 5 deletions.
6 changes: 1 addition & 5 deletions drivers/net/via-velocity.c
Original file line number Diff line number Diff line change
Expand Up @@ -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,
struct sk_buff *skb, int pkt_size)
{
/* FIXME - memmove ? */
if (vptr->flags & VELOCITY_FLAGS_IP_ALIGN) {
int i;

for (i = pkt_size; i >= 0; i--)
*(skb->data + i + 2) = *(skb->data + i);
memmove(skb->data + 2, skb->data, pkt_size);
skb_reserve(skb, 2);
}
}
Expand Down

0 comments on commit c03571a

Please sign in to comment.