diff options
| author | Gerd Moellmann | 2000-03-12 17:01:02 +0000 |
|---|---|---|
| committer | Gerd Moellmann | 2000-03-12 17:01:02 +0000 |
| commit | 4ab1d4be61e081dab81b3c235bb9ddfd43be5d2b (patch) | |
| tree | b6a4afa33b7d45132d41d82c82b150f1aa3b088f /src | |
| parent | 9172b88ddf0f6cf94bdf9df36c74235ce09754dc (diff) | |
| download | emacs-4ab1d4be61e081dab81b3c235bb9ddfd43be5d2b.tar.gz emacs-4ab1d4be61e081dab81b3c235bb9ddfd43be5d2b.zip | |
(cancel_atimer): Break out of the loop as soon as timer
has been found. Fix bug not computing timer's predecessor.
Diffstat (limited to 'src')
| -rw-r--r-- | src/atimer.c | 3 |
1 files changed, 2 insertions, 1 deletions
diff --git a/src/atimer.c b/src/atimer.c index eafe0f5ebf6..a05498ba845 100644 --- a/src/atimer.c +++ b/src/atimer.c | |||
| @@ -176,7 +176,7 @@ cancel_atimer (timer) | |||
| 176 | struct atimer **list = i ? &stopped_atimers : &atimers; | 176 | struct atimer **list = i ? &stopped_atimers : &atimers; |
| 177 | 177 | ||
| 178 | /* See if TIMER is active or stopped. */ | 178 | /* See if TIMER is active or stopped. */ |
| 179 | for (t = *list, prev = 0; t && t != timer; t = t->next) | 179 | for (t = *list, prev = NULL; t && t != timer; prev = t, t = t->next) |
| 180 | ; | 180 | ; |
| 181 | 181 | ||
| 182 | /* If it is, take it off the its list, and put in on the | 182 | /* If it is, take it off the its list, and put in on the |
| @@ -191,6 +191,7 @@ cancel_atimer (timer) | |||
| 191 | 191 | ||
| 192 | t->next = free_atimers; | 192 | t->next = free_atimers; |
| 193 | free_atimers = t; | 193 | free_atimers = t; |
| 194 | break; | ||
| 194 | } | 195 | } |
| 195 | } | 196 | } |
| 196 | 197 | ||