diff options
author | Elena Zannoni <ezannoni@kwikemart.cygnus.com> | 2000-03-06 17:07:03 +0000 |
---|---|---|
committer | Elena Zannoni <ezannoni@kwikemart.cygnus.com> | 2000-03-06 17:07:03 +0000 |
commit | 2f16bb3237ded37b221052edc90f05125c5f63b9 (patch) | |
tree | 0c0b6adac11b98ca73bc231737f9c2c4213b688b /gdb | |
parent | b948cda90b73153b5e5ee4186fcb5ebdb42308d9 (diff) | |
download | gdb-2f16bb3237ded37b221052edc90f05125c5f63b9.zip gdb-2f16bb3237ded37b221052edc90f05125c5f63b9.tar.gz gdb-2f16bb3237ded37b221052edc90f05125c5f63b9.tar.bz2 |
2000-03-06 Elena Zannoni <ezannoni@kwikemart.cygnus.com>
From Eli Zaretskii <eliz@is.elta.co.il>:
* event-loop.c (poll_timers): Don't compare delta.tv_sec with
zero, since time_t might be unsigned.
Diffstat (limited to 'gdb')
-rw-r--r-- | gdb/ChangeLog | 7 | ||||
-rw-r--r-- | gdb/event-loop.c | 7 |
2 files changed, 12 insertions, 2 deletions
diff --git a/gdb/ChangeLog b/gdb/ChangeLog index 4e9b0c2..405bdbb 100644 --- a/gdb/ChangeLog +++ b/gdb/ChangeLog @@ -1,3 +1,10 @@ +2000-03-06 Elena Zannoni <ezannoni@kwikemart.cygnus.com> + + From Eli Zaretskii <eliz@is.elta.co.il>: + + * event-loop.c (poll_timers): Don't compare delta.tv_sec with + zero, since time_t might be unsigned. + 2000-03-06 Mark Kettenis <kettenis@gnu.org> * i386-linux-nat.c (supply_fpregset): Mask off the reserved bits diff --git a/gdb/event-loop.c b/gdb/event-loop.c index dd849df..d6babc2 100644 --- a/gdb/event-loop.c +++ b/gdb/event-loop.c @@ -1114,8 +1114,11 @@ poll_timers (void) } /* Oops it expired already. Tell select / poll to return - immediately. */ - if (delta.tv_sec < 0) + immediately. (Cannot simply test if delta.tv_sec is negative + because time_t might be unsigned.) */ + if (timer_list.first_timer->when.tv_sec < time_now.tv_sec + || (timer_list.first_timer->when.tv_sec == time_now.tv_sec + && timer_list.first_timer->when.tv_usec < time_now.tv_usec)) { delta.tv_sec = 0; delta.tv_usec = 0; |