From 604e247818b11767aa0bf6507c0707df328bb2a2 Mon Sep 17 00:00:00 2001 From: mycroft Date: Wed, 5 Aug 1998 23:24:02 +0000 Subject: [PATCH] Use the count at the beginning of __CTOR_LIST__. --- lib/csu/c++/c++rt0.c | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/lib/csu/c++/c++rt0.c b/lib/csu/c++/c++rt0.c index 0d6a4df4e2d4..5e64a84f8163 100644 --- a/lib/csu/c++/c++rt0.c +++ b/lib/csu/c++/c++rt0.c @@ -1,4 +1,4 @@ -/* $NetBSD: c++rt0.c,v 1.6 1997/12/29 15:36:50 pk Exp $ */ +/* $NetBSD: c++rt0.c,v 1.7 1998/08/05 23:24:02 mycroft Exp $ */ /* * Copyright (c) 1993 Paul Kranenburg @@ -71,9 +71,10 @@ __dtors() static void __ctors() { + unsigned long i = (unsigned long) __CTOR_LIST__[0]; void (**p)(void) = __CTOR_LIST__ + 1; - while (*p) + while (i--) (**p++)(); }