usb: use if-else in packet_handler

Apparently this construct leads to a compiler errors like

  error: second operand to the conditional operator is of type ‘void’, but
  the third operand is neither a throw-expression nor of type ‘void’
This commit is contained in:
Josef Söntgen 2017-05-19 14:31:36 +02:00 committed by Christian Helmuth
parent c9db94313c
commit 8f577e9d25

View File

@ -76,7 +76,8 @@ class Usb::Packet_handler
void wait_for_packet()
{
packet_avail() ? _packet_handler() : _ep.wait_and_dispatch_one_io_signal();
if (packet_avail()) { _packet_handler(); }
else { _ep.wait_and_dispatch_one_io_signal(); }
}
Packet_descriptor alloc(size_t size)