Instead of dynamically allocating list heads allocated them statically
authorMax Okumoto <okumoto@dragonflybsd.org>
Fri, 17 Dec 2004 08:13:30 +0000 (08:13 +0000)
committerMax Okumoto <okumoto@dragonflybsd.org>
Fri, 17 Dec 2004 08:13:30 +0000 (08:13 +0000)
commit0a7e0b85066c583b36867cd9448b50bb9897b795
tree1324a36757ec48a8c440e0d3a09f7d3c6b2d9a39
parent7bb8b6cc577ba7124b2612a075476ba49193ab09
Instead of dynamically allocating list heads allocated them statically
now that their size is only two pointers. This eliminates a lot of calls
to Lst_Init and from there to malloc together with many calls to
Lst_Destroy (in places where the list is obviously empty). This also
reduces the chance to leave a list uninitilized so we can remove more
NULL pointer checks and probably eliminates a couple of memory leaks.

Taken-from: FreeBSD
Author: harti
19 files changed:
usr.bin/make/Makefile
usr.bin/make/arch.c
usr.bin/make/compat.c
usr.bin/make/cond.c
usr.bin/make/dir.c
usr.bin/make/for.c
usr.bin/make/job.c
usr.bin/make/lst.h
usr.bin/make/lst.lib/lstConcat.c
usr.bin/make/lst.lib/lstDestroy.c
usr.bin/make/lst.lib/lstDupl.c
usr.bin/make/main.c
usr.bin/make/make.c
usr.bin/make/make.h
usr.bin/make/nonints.h
usr.bin/make/parse.c
usr.bin/make/suff.c
usr.bin/make/targ.c
usr.bin/make/var.c