OSDN Git Service

2000-10-25 Fernando Nasser <fnasser@cygnus.com>
authorfnasser <fnasser>
Wed, 25 Oct 2000 14:19:38 +0000 (14:19 +0000)
committerfnasser <fnasser>
Wed, 25 Oct 2000 14:19:38 +0000 (14:19 +0000)
        * ser-unix.c (do_unix_readchar): Coding style improvement only.

gdb/ChangeLog
gdb/ser-unix.c

index cb488c5..77949b3 100644 (file)
@@ -1,5 +1,9 @@
 2000-10-25  Fernando Nasser  <fnasser@cygnus.com>
 
+       * ser-unix.c (do_unix_readchar): Coding style improvement only.
+
+2000-10-25  Fernando Nasser  <fnasser@cygnus.com>
+
         * target.c (generic_mourn_inferior): Notify GUI that inferior is gone
         by calling detach_hook, if defined.
 
index 73555b2..a6c7b04 100644 (file)
@@ -927,7 +927,8 @@ do_unix_readchar (serial_t scb, int timeout)
        }
 
       status = ser_unix_wait_for (scb, delta);
-      timeout = (timeout <= 0) ? timeout : (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. */