From 7414d16a24aa82d4a9d369ddf0e2a4fc981d5393 Mon Sep 17 00:00:00 2001 From: Johan Hedberg Date: Sun, 15 May 2011 01:55:16 +0300 Subject: btio: Fix unused variable warning --- btio/btio.c | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) (limited to 'btio') diff --git a/btio/btio.c b/btio/btio.c index a3cf38a3..918eea87 100644 --- a/btio/btio.c +++ b/btio/btio.c @@ -1133,8 +1133,10 @@ gboolean bt_io_accept(GIOChannel *io, BtIOConnect connect, gpointer user_data, } if (!(pfd.revents & POLLOUT)) { - int ret; - ret = read(sock, &c, 1); + if (read(sock, &c, 1) < 0) { + ERROR_FAILED(err, "read", errno); + return FALSE; + } } accept_add(io, connect, user_data, destroy); -- cgit v1.2.3