From 01816068c8254c3440e8e6afac250ae00e332b91 Mon Sep 17 00:00:00 2001
From: Paul Sokolovsky <pfalcon@users.sourceforge.net>
Date: Wed, 27 Jul 2016 02:50:11 +0300
Subject: [PATCH] unix/file: fdfile_ioctl(): Fix argument to
 check_fd_is_open().

---
 unix/file.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/unix/file.c b/unix/file.c
index 2c8652d7f..824327265 100644
--- a/unix/file.c
+++ b/unix/file.c
@@ -105,7 +105,7 @@ STATIC mp_uint_t fdfile_write(mp_obj_t o_in, const void *buf, mp_uint_t size, in
 
 STATIC mp_uint_t fdfile_ioctl(mp_obj_t o_in, mp_uint_t request, uintptr_t arg, int *errcode) {
     mp_obj_fdfile_t *o = MP_OBJ_TO_PTR(o_in);
-    check_fd_is_open(o_in);
+    check_fd_is_open(o);
     switch (request) {
         case MP_STREAM_SEEK: {
             struct mp_stream_seek_t *s = (struct mp_stream_seek_t*)arg;
-- 
GitLab