diff options
author | rsc <rsc> | 2009-05-31 02:07:51 +0000 |
---|---|---|
committer | rsc <rsc> | 2009-05-31 02:07:51 +0000 |
commit | f3685aa391431d5eafbc918e1d143dd731c64787 (patch) | |
tree | 729cd8f2c7788e5fb87c84a3748760b5fd87e06b /pipe.c | |
parent | 7f399ccaa4fb14527238be333fab207ae3a57856 (diff) | |
download | xv6-labs-f3685aa391431d5eafbc918e1d143dd731c64787.tar.gz xv6-labs-f3685aa391431d5eafbc918e1d143dd731c64787.tar.bz2 xv6-labs-f3685aa391431d5eafbc918e1d143dd731c64787.zip |
simplify
Diffstat (limited to 'pipe.c')
-rw-r--r-- | pipe.c | 8 |
1 files changed, 2 insertions, 6 deletions
@@ -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; } |