From faa5effd27ffdd000aefe2f7cc9e6e915283c910 Mon Sep 17 00:00:00 2001 From: Fernando Nasser Date: Wed, 25 Oct 2000 14:19:38 +0000 Subject: [PATCH] 2000-10-25 Fernando Nasser * ser-unix.c (do_unix_readchar): Coding style improvement only. --- gdb/ChangeLog | 4 ++++ gdb/ser-unix.c | 3 ++- 2 files changed, 6 insertions(+), 1 deletion(-) diff --git a/gdb/ChangeLog b/gdb/ChangeLog index cb488c5b89..77949b3a18 100644 --- a/gdb/ChangeLog +++ b/gdb/ChangeLog @@ -1,3 +1,7 @@ +2000-10-25 Fernando Nasser + + * ser-unix.c (do_unix_readchar): Coding style improvement only. + 2000-10-25 Fernando Nasser * target.c (generic_mourn_inferior): Notify GUI that inferior is gone diff --git a/gdb/ser-unix.c b/gdb/ser-unix.c index 73555b27a0..a6c7b04555 100644 --- a/gdb/ser-unix.c +++ b/gdb/ser-unix.c @@ -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. */