fixed a typo
This commit is contained in:
parent
a54782d69b
commit
9b2bed733c
1 changed files with 3 additions and 1 deletions
|
@ -25,7 +25,8 @@ getrdstruct(int fd)
|
||||||
ReadWriter *rval;
|
ReadWriter *rval;
|
||||||
if(gio_filedes_st[fd] != 1)
|
if(gio_filedes_st[fd] != 1)
|
||||||
rval = nil;
|
rval = nil;
|
||||||
rval = gio_filedes[fd];
|
else
|
||||||
|
rval = gio_filedes[fd];
|
||||||
runlock(&giolock);
|
runlock(&giolock);
|
||||||
return rval;
|
return rval;
|
||||||
}
|
}
|
||||||
|
@ -37,6 +38,7 @@ gopen(ReadWriter* rd, void *aux)
|
||||||
ReadWriter *buf;
|
ReadWriter *buf;
|
||||||
|
|
||||||
wlock(&giolock);
|
wlock(&giolock);
|
||||||
|
pfd = getnext();
|
||||||
if(pfd == -1){
|
if(pfd == -1){
|
||||||
wunlock(&giolock);
|
wunlock(&giolock);
|
||||||
return -1;
|
return -1;
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue