diff options
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; | 
