vx32

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

commit 18730b970da489475cc4c31d3f5b506f21d72fc7
parent 814a61813ffc510f45d71e3b18e89ab7efe5327a
Author: Jesus Galan Lopez (yiyus) <yiyu.jgl@gmail.com>
Date:   Tue, 28 Sep 2010 22:18:39 +0200

fix etherx= when x > nve

Diffstat:
Msrc/9vx/etherpcap.c | 4++--
Msrc/9vx/ethertap.c | 4++--
2 files changed, 4 insertions(+), 4 deletions(-)

diff --git a/src/9vx/etherpcap.c b/src/9vx/etherpcap.c @@ -158,9 +158,9 @@ pcappnp(Ether* e) Ctlr c; static int cve = 0; - while(cve < nve && ve[cve].tap == 1) + while(cve < MaxEther && ve[cve].tap == 1) cve++; - if(cve >= nve) + if(cve == MaxEther || ve[cve].dev == nil) return -1; memset(&c, 0, sizeof(c)); diff --git a/src/9vx/ethertap.c b/src/9vx/ethertap.c @@ -170,9 +170,9 @@ tappnp(Ether* e) Ctlr c; static int cve = 0; - while(cve < nve && ve[cve].tap == 0) + while(cve < MaxEther && ve[cve].tap == 0) cve++; - if(cve == nve) + if(cve == MaxEther || ve[cve].dev == nil) return -1; memset(&c, 0, sizeof c);