* lin-lwp.c (stop_wait_callback): Remove bogus assertions in the
[deliverable/binutils-gdb.git] / gdb / ser-unix.c
index 5a1ec1dc14f0d02f95fee8648d60c70dbfc9e67a..73555b27a0a6e0fe7b1651f423be5753d2c55604 100644 (file)
@@ -927,7 +927,7 @@ do_unix_readchar (serial_t scb, int timeout)
        }
 
       status = ser_unix_wait_for (scb, delta);
-      timeout -= delta;
+      timeout = (timeout <= 0) ? timeout : (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. */
This page took 0.023326 seconds and 4 git commands to generate.