btio: Fix unused variable warning

This commit is contained in:
Johan Hedberg 2011-05-15 01:55:16 +03:00 committed by Marcel Holtmann
parent ce861145f0
commit 7414d16a24
1 changed files with 4 additions and 2 deletions

View File

@ -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);