Welcome to mirror list, hosted at ThFree Co, Russian Federation.

cygwin.com/git/newlib-cygwin.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
path: root/newlib
diff options
context:
space:
mode:
authorRichard Sandiford <rdsandiford@googlemail.com>2003-10-22 12:45:01 +0400
committerRichard Sandiford <rdsandiford@googlemail.com>2003-10-22 12:45:01 +0400
commit63a823f8f40d4e60eeaaf80570e9991e81c2ef18 (patch)
tree5d8682acdc4f449b3738f896c0368963576227b9 /newlib
parentac06287b30ea1b1a49adc0a65e2536a082f33bde (diff)
* libc/stdlib/exit.c (exit): Handle null _GLOBAL_REENT->_atexits.
Diffstat (limited to 'newlib')
-rw-r--r--newlib/ChangeLog4
-rw-r--r--newlib/libc/stdlib/exit.c3
2 files changed, 5 insertions, 2 deletions
diff --git a/newlib/ChangeLog b/newlib/ChangeLog
index 74495c317..0af6c34a6 100644
--- a/newlib/ChangeLog
+++ b/newlib/ChangeLog
@@ -1,3 +1,7 @@
+2003-10-22 Richard Sandiford <rsandifo@redhat.com>
+
+ * libc/stdlib/exit.c (exit): Handle null _GLOBAL_REENT->_atexits.
+
2003-10-20 Bob Wilson <bob.wilson@acm.org>
* libc/locale/locale.c: Use double quotes in code.
diff --git a/newlib/libc/stdlib/exit.c b/newlib/libc/stdlib/exit.c
index dad2861d2..be96488c8 100644
--- a/newlib/libc/stdlib/exit.c
+++ b/newlib/libc/stdlib/exit.c
@@ -83,7 +83,7 @@ _DEFUN (exit, (code),
}
#else
p = _GLOBAL_REENT->_atexit;
- do
+ while (p)
{
args = & p->_on_exit_args;
@@ -95,7 +95,6 @@ _DEFUN (exit, (code),
p = p->_next;
}
- while (p);
#endif
if (_GLOBAL_REENT->__cleanup)