summaryrefslogtreecommitdiff
path: root/sys/src/9/ip
diff options
context:
space:
mode:
authorcinap_lenrek <cinap_lenrek@gmx.de>2013-05-05 04:28:50 +0200
committercinap_lenrek <cinap_lenrek@gmx.de>2013-05-05 04:28:50 +0200
commitd3b727db18c04b1eb485399dfcebff8ff61d8c7b (patch)
tree877019708b96f8c5fe3d9502a287cfea72ce8497 /sys/src/9/ip
parent9500191af630673a28266cab9b4e109275847c90 (diff)
devip: dont raise error() out of Fsprotocone()
Fsprotoclone() is not supposed to raise error, but return nil. ipopen() seemed to assume otherwise as it setup error label before calling Fsprotoclone(). fix ipopen(), make Fsprotoclone() return nil instead of raising error.
Diffstat (limited to 'sys/src/9/ip')
-rw-r--r--sys/src/9/ip/devip.c9
1 files changed, 2 insertions, 7 deletions
diff --git a/sys/src/9/ip/devip.c b/sys/src/9/ip/devip.c
index 74c83ea6d..7e7b379b4 100644
--- a/sys/src/9/ip/devip.c
+++ b/sys/src/9/ip/devip.c
@@ -407,13 +407,8 @@ ipopen(Chan* c, int omode)
case Qclone:
p = f->p[PROTO(c->qid)];
qlock(p);
- if(waserror()){
- qunlock(p);
- nexterror();
- }
cv = Fsprotoclone(p, ATTACHER(c));
qunlock(p);
- poperror();
if(cv == nil) {
error(Enodev);
break;
@@ -1285,7 +1280,7 @@ retry:
if(c == nil){
c = malloc(sizeof(Conv));
if(c == nil)
- error(Enomem);
+ return nil;
if(waserror()){
qfree(c->rq);
qfree(c->wq);
@@ -1293,7 +1288,7 @@ retry:
qfree(c->sq);
free(c->ptcl);
free(c);
- nexterror();
+ return nil;
}
c->p = p;
c->x = pp - p->conv;