OSDN Git Service

Check the return value when reading HCI type byte
authorPavlin Radoslavov <pavlin@google.com>
Thu, 20 Aug 2015 23:53:16 +0000 (16:53 -0700)
committerPavlin Radoslavov <pavlin@google.com>
Mon, 24 Aug 2015 01:13:45 +0000 (18:13 -0700)
commitaa41fec0e36653e828bfc2a54fca11447ed56cc5
tree9105ac86b8c07aa598fb57f5f1a1e4b67f68a12a
parentd2199cbb8f361772819402b56e6fa46587a31c56
Check the return value when reading HCI type byte

Add missing return value check when reading the HCI type byte.
This check is needed as a safeguard. For example, function
event_uart_has_bytes() could be called (indirectly)
within the run_reactor() loop not only when there are bytes to read,
but also if there is an error (e.g., EPOLLHUP | EPOLLRDHUP | EPOLLERR).

Bug: 23105107
Change-Id: Ic3b6e4d656406949e384c8106b0c607f7c221759
hci/src/hci_hal_h4.c