summaryrefslogtreecommitdiff
path: root/pipe.c
diff options
context:
space:
mode:
authorrsc <rsc>2009-05-31 02:07:51 +0000
committerrsc <rsc>2009-05-31 02:07:51 +0000
commitf3685aa391431d5eafbc918e1d143dd731c64787 (patch)
tree729cd8f2c7788e5fb87c84a3748760b5fd87e06b /pipe.c
parent7f399ccaa4fb14527238be333fab207ae3a57856 (diff)
downloadxv6-labs-f3685aa391431d5eafbc918e1d143dd731c64787.tar.gz
xv6-labs-f3685aa391431d5eafbc918e1d143dd731c64787.tar.bz2
xv6-labs-f3685aa391431d5eafbc918e1d143dd731c64787.zip
simplify
Diffstat (limited to 'pipe.c')
-rw-r--r--pipe.c8
1 files changed, 2 insertions, 6 deletions
diff --git a/pipe.c b/pipe.c
index 8a580f9..7f18e98 100644
--- a/pipe.c
+++ b/pipe.c
@@ -47,14 +47,10 @@ pipealloc(struct file **f0, struct file **f1)
bad:
if(p)
kfree((char*)p, PAGE);
- if(*f0){
- (*f0)->type = FD_NONE;
+ if(*f0)
fileclose(*f0);
- }
- if(*f1){
- (*f1)->type = FD_NONE;
+ if(*f1)
fileclose(*f1);
- }
return -1;
}