From 4775779d8ee68be3fb04f93f60ff006cd5cc40ec Mon Sep 17 00:00:00 2001 From: ceriel Date: Wed, 6 Oct 1993 13:15:12 +0000 Subject: [PATCH] Made more portable --- lang/cem/libcc.ansi/stdlib/malloc/log.c | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/lang/cem/libcc.ansi/stdlib/malloc/log.c b/lang/cem/libcc.ansi/stdlib/malloc/log.c index 37521c407..e9062a6e5 100644 --- a/lang/cem/libcc.ansi/stdlib/malloc/log.c +++ b/lang/cem/libcc.ansi/stdlib/malloc/log.c @@ -12,7 +12,7 @@ The chunks are properly chained in the physical chain. */ -privatedata mallink *free_list[MAX_FLIST]; +privatedata mallink *free_list[MAX_FLIST+1]; public link_free_chunk(register mallink *ml) @@ -20,7 +20,7 @@ link_free_chunk(register mallink *ml) /* The free chunk ml is inserted in its proper logical chain. */ - register mallink **mlp = &free_list[-1]; + register mallink **mlp = &free_list[0]; register size_type n = size_of(ml); register mallink *ml1; @@ -32,7 +32,7 @@ link_free_chunk(register mallink *ml) } while (n >= MIN_SIZE); - ml1 = *mlp; + ml1 = *--mlp; set_log_prev(ml, MAL_NULL); set_log_next(ml, ml1); calc_checksum(ml);