diff options
author | Claudio Takahasi <claudio.takahasi@openbossa.org> | 2007-01-25 17:27:52 +0000 |
---|---|---|
committer | Claudio Takahasi <claudio.takahasi@openbossa.org> | 2007-01-25 17:27:52 +0000 |
commit | 97e3051ec51ac5bdcb37a371249360163eaf5709 (patch) | |
tree | 9b73ed207630e7e9ce92e5dd4ff9fccccbae4e24 /common/dbus.c | |
parent | e28ba76d230192a1a970819cc3588b986a624ea2 (diff) |
set_nonblocking: removed err argument
Diffstat (limited to 'common/dbus.c')
-rw-r--r-- | common/dbus.c | 10 |
1 files changed, 3 insertions, 7 deletions
diff --git a/common/dbus.c b/common/dbus.c index 92a86e73..bc1125fa 100644 --- a/common/dbus.c +++ b/common/dbus.c @@ -645,16 +645,14 @@ DBusHandlerResult simple_introspect(DBusConnection *conn, return send_message_and_unref(conn, reply); } -int set_nonblocking(int fd, int *err) +int set_nonblocking(int fd) { long arg; arg = fcntl(fd, F_GETFL); if (arg < 0) { - if (err) - *err = errno; error("fcntl(F_GETFL): %s (%d)", strerror(errno), errno); - return -1; + return -errno; } /* Return if already nonblocking */ @@ -663,11 +661,9 @@ int set_nonblocking(int fd, int *err) arg |= O_NONBLOCK; if (fcntl(fd, F_SETFL, arg) < 0) { - if (err) - *err = errno; error("fcntl(F_SETFL, O_NONBLOCK): %s (%d)", strerror(errno), errno); - return -1; + return -errno; } return 0; |