vx32

Local 9vx git repository for patches.
git clone git://r-36.net/vx32
Log | Files | Refs

commit 239ea575a54c087fe434ef18282f36f1ea1779bc
parent 1c3419dcc8372f87559d39f46a72a72dc789796c
Author: Jesus Galan Lopez (yiyus) <yiyu.jgl@gmail.com>
Date:   Sun, 13 Jun 2010 11:30:59 +0200

use memcpy to copy memory

Diffstat:
src/9vx/etherve.c | 5++---
1 file changed, 2 insertions(+), 3 deletions(-)

diff --git a/src/9vx/etherve.c b/src/9vx/etherve.c @@ -84,15 +84,14 @@ static Block * vepkt(Ctlr *c) { struct pcap_pkthdr hdr; - uchar *p, *q; + uchar *p; Block *b; while ((p = pcap_next(c->pd, &hdr)) == nil); b = allocb(hdr.caplen); + memcpy(b->rp, p, hdr.caplen); b->wp += hdr.caplen; - for(q = b->rp; q != b->wp; q++) - *q = *(p++); b->flag |= Btcpck|Budpck|Bpktck; /*