[PATCH 2/6] fs: do not lookup global FILE * when the file is already available

Sascha Hauer s.hauer at pengutronix.de
Wed Oct 8 07:24:11 PDT 2014


Signed-off-by: Sascha Hauer <s.hauer at pengutronix.de>
---
 fs/fs.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/fs/fs.c b/fs/fs.c
index 014a36a..04b6408 100644
--- a/fs/fs.c
+++ b/fs/fs.c
@@ -251,7 +251,7 @@ static FILE *get_file(void)
 
 static void put_file(FILE *f)
 {
-	files[f->no].in_use = 0;
+	f->in_use = 0;
 }
 
 static int check_fd(int fd)
-- 
2.1.0




More information about the barebox mailing list