]> err.no Git - linux-2.6/commitdiff
via-velocity: use memmove
authorStephen Hemminger <shemminger@vyatta.com>
Wed, 16 Apr 2008 23:37:32 +0000 (16:37 -0700)
committerJeff Garzik <jgarzik@redhat.com>
Thu, 22 May 2008 18:12:55 +0000 (14:12 -0400)
Use memmove to handle overlapping copy of data.

Signed-off-by: Stephen Hemminger <shemminger@vyatta.com>
Signed-off-by: Jeff Garzik <jgarzik@redhat.com>
drivers/net/via-velocity.c

index 3e94c8fff9e281e7d0480e74c2d852d658b8a713..bcbf2fa9b94abd4a700ba843e0148d18d7c58ef4 100644 (file)
@@ -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);
        }
 }