diff --git a/src/system/libroot/posix/unistd/ioctl.c b/src/system/libroot/posix/unistd/ioctl.c index a831a2964f..3f733df137 100644 --- a/src/system/libroot/posix/unistd/ioctl.c +++ b/src/system/libroot/posix/unistd/ioctl.c @@ -10,14 +10,7 @@ #include #include - - -#define RETURN_AND_SET_ERRNO(err) \ - if (err < 0) { \ - __set_errno(err); \ - return -1; \ - } \ - return err; +#include int @@ -35,5 +28,5 @@ ioctl(int fd, ulong cmd, ...) status = _kern_ioctl(fd, cmd, argument, size); - RETURN_AND_SET_ERRNO(status) + RETURN_AND_SET_ERRNO(status); }