From bfe73fd683053201c326f9ff2c8e5e0f69cc7fe7 Mon Sep 17 00:00:00 2001 From: imp Date: Wed, 16 Sep 1998 04:17:47 +0000 Subject: Replace memory leaking instances of realloc with non-leaking reallocf. In some cases replace if (a == null) a = malloc(x); else a = realloc(a, x); with simple reallocf(a, x). Per ANSI-C, this is guaranteed to be the same thing. I've been running these on my system here w/o ill effects for some time. However, the CTM-express is at part 6 of 34 for the CAM changes, so I've not been able to do a build world with the CAM in the tree with these changes. Shouldn't impact anything, but... --- lib/libc/stdio/vfprintf.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) (limited to 'lib/libc/stdio/vfprintf.c') diff --git a/lib/libc/stdio/vfprintf.c b/lib/libc/stdio/vfprintf.c index 57022e5..3cb58ed 100644 --- a/lib/libc/stdio/vfprintf.c +++ b/lib/libc/stdio/vfprintf.c @@ -39,7 +39,7 @@ static char sccsid[] = "@(#)vfprintf.c 8.1 (Berkeley) 6/4/93"; #endif static const char rcsid[] = - "$Id: vfprintf.c,v 1.18 1998/04/11 07:40:47 jb Exp $"; + "$Id: vfprintf.c,v 1.19 1998/05/08 05:10:32 jb Exp $"; #endif /* LIBC_SCCS and not lint */ /* @@ -1182,7 +1182,7 @@ __grow_type_table (nextarg, typetable, tablesize) bcopy (oldtable, *typetable, *tablesize); } else { *typetable = (unsigned char *) - realloc (typetable, sizeof (unsigned char) * newsize); + reallocf (typetable, sizeof (unsigned char) * newsize); } memset (&typetable [*tablesize], T_UNUSED, (newsize - *tablesize)); -- cgit v1.1