}
static int
-hardwire_setstopbits (scb, num)
- serial_t scb;
- int num;
+hardwire_setstopbits (serial_t scb, int num)
{
struct hardwire_ttystate state;
int newbit;
}
status = ser_unix_wait_for (scb, delta);
- timeout -= delta;
+ if (timeout > 0)
+ timeout -= delta;
/* If we got a character or an error back from wait_for, then we can
break from the loop before the timeout is completed. */
if (SERIAL_DEBUG_P (scb))
fprintf_unfiltered (gdb_stdlog, "[fd%d->synchronous]\n",
scb->fd);
- /* De-schedule what ever tasks are currently scheduled. */
+ /* De-schedule whatever tasks are currently scheduled. */
switch (scb->async_state)
{
case FD_SCHEDULED: