diff options
author | Pixel <pixel@nobis-crew.org> | 2011-02-05 13:43:35 -0800 |
---|---|---|
committer | Pixel <pixel@nobis-crew.org> | 2011-02-05 13:43:35 -0800 |
commit | ab16fcf76e616dfa7cac2cb3dd909ba2a8eb2a9f (patch) | |
tree | 5f93ecc452d648bbd84ffeda38ee5a0247e37dcc /libc/src/write.c | |
parent | 8361bc28f9215a07e2275f55561408d1bfca112f (diff) |
Slightly better errno support.
Diffstat (limited to 'libc/src/write.c')
-rw-r--r-- | libc/src/write.c | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/libc/src/write.c b/libc/src/write.c index e44806c..52b1457 100644 --- a/libc/src/write.c +++ b/libc/src/write.c @@ -6,14 +6,14 @@ ssize_t write(int fd, const void * buf, size_t size) { ssize_t r; if (!fio_is_open(fd)) { - _impure_ptr->_errno = EBADF; + set_errno(EBADF); return -1; } r = fio_write(fd, buf, size); if (r < 0) { - _impure_ptr->_errno = EINVAL; + set_errno(EINVAL); return -1; } |