aboutsummaryrefslogtreecommitdiffstats
path: root/camel/camel-stream-fs.c
diff options
context:
space:
mode:
Diffstat (limited to 'camel/camel-stream-fs.c')
-rw-r--r--camel/camel-stream-fs.c10
1 files changed, 4 insertions, 6 deletions
diff --git a/camel/camel-stream-fs.c b/camel/camel-stream-fs.c
index 92c11435fa..c1758c1ab0 100644
--- a/camel/camel-stream-fs.c
+++ b/camel/camel-stream-fs.c
@@ -226,10 +226,9 @@ stream_read (CamelStream *stream, char *buffer, size_t n)
} while (nread == -1 && errno == EINTR);
} else {
fd_set rdset;
- long flags;
- int fdmax;
+ int flags, fdmax;
- fcntl(stream_fs->fd, F_GETFL, &flags);
+ flags = fcntl(stream_fs->fd, F_GETFL);
fcntl(stream_fs->fd, F_SETFL, flags | O_NONBLOCK);
FD_ZERO(&rdset);
FD_SET(stream_fs->fd, &rdset);
@@ -278,10 +277,9 @@ stream_write (CamelStream *stream, const char *buffer, size_t n)
} while (v == -1 && errno == EINTR);
} else {
fd_set rdset, wrset;
- long flags;
- int fdmax;
+ int flags, fdmax;
- fcntl(stream_fs->fd, F_GETFL, &flags);
+ flags = fcntl(stream_fs->fd, F_GETFL);
fcntl(stream_fs->fd, F_SETFL, flags | O_NONBLOCK);
FD_ZERO(&rdset);
FD_ZERO(&wrset);