diff options
-rw-r--r-- | winsup/cygwin/ChangeLog | 5 | ||||
-rw-r--r-- | winsup/cygwin/dll_init.cc | 4 |
2 files changed, 7 insertions, 2 deletions
diff --git a/winsup/cygwin/ChangeLog b/winsup/cygwin/ChangeLog index 4b26c9aee..815b2e338 100644 --- a/winsup/cygwin/ChangeLog +++ b/winsup/cygwin/ChangeLog @@ -1,3 +1,8 @@ +2010-02-05 Christopher Faylor <me+cygwin@cgf.cx> + + * dll_init.cc (per_module::run_dtors): Use consistent method for + running destructors. + 2010-02-04 Christopher Faylor <me+cygwin@cgf.cx> * regcomp.c (p_ere): Workaround incorrect compiler warning. diff --git a/winsup/cygwin/dll_init.cc b/winsup/cygwin/dll_init.cc index e449f7777..055b1060f 100644 --- a/winsup/cygwin/dll_init.cc +++ b/winsup/cygwin/dll_init.cc @@ -63,8 +63,8 @@ void per_module::run_dtors () { void (**pfunc)() = dtors; - for (int i = 1; pfunc[i]; i++) - (pfunc[i]) (); + while (*++pfunc) + (*pfunc) (); } /* Initialize an individual DLL */ |