shithub: riscv

Download patch

ref: 9b2bed733c2189335ee96b5f28f4472ea92628aa
parent: a54782d69b31f3eaeb77a8087016065790c200bb
author: Matthew Veety <mveety@mveety.com>
date: Tue Feb 9 12:02:18 EST 2016

fixed a typo

--- a/sys/src/libgio/openclose.c
+++ b/sys/src/libgio/openclose.c
@@ -25,7 +25,8 @@
 	ReadWriter *rval;
 	if(gio_filedes_st[fd] != 1)
 		rval = nil;
-	rval = gio_filedes[fd];
+	else
+		rval = gio_filedes[fd];
 	runlock(&giolock);
 	return rval;
 }
@@ -37,6 +38,7 @@
 	ReadWriter *buf;
 
 	wlock(&giolock);
+	pfd = getnext();
 	if(pfd == -1){
 		wunlock(&giolock);
 		return -1;