diff options
| author | rillig <rillig@NetBSD.org> | 2021-12-15 11:01:39 +0000 |
|---|---|---|
| committer | rillig <rillig@NetBSD.org> | 2021-12-15 11:01:39 +0000 |
| commit | 60cd82e4e299c347845e52267912ca844a31bb19 (patch) | |
| tree | 49a6da9a4dd05c07e0fe4e1640caf00917a24b74 /usr.bin/make/make_malloc.h | |
| parent | fe62f5600501245959f75241db295568657c7110 (diff) | |
make: remove bmake_free
It was only used in 2 places, and in both these places, the pointer was
never null.
Diffstat (limited to 'usr.bin/make/make_malloc.h')
| -rw-r--r-- | usr.bin/make/make_malloc.h | 16 |
1 files changed, 1 insertions, 15 deletions
diff --git a/usr.bin/make/make_malloc.h b/usr.bin/make/make_malloc.h index a023d211f45..b1cfe848783 100644 --- a/usr.bin/make/make_malloc.h +++ b/usr.bin/make/make_malloc.h @@ -1,4 +1,4 @@ -/* $NetBSD: make_malloc.h,v 1.17 2021/12/15 09:53:41 rillig Exp $ */ +/* $NetBSD: make_malloc.h,v 1.18 2021/12/15 11:01:39 rillig Exp $ */ /* * Copyright (c) 2009 The NetBSD Foundation, Inc. @@ -40,17 +40,3 @@ char *bmake_strldup(const char *, size_t) MAKE_ATTR_USE; #endif char *bmake_strsedup(const char *, const char *) MAKE_ATTR_USE; - -/* - * Thin wrapper around free(3) to avoid the extra function call in case - * p is NULL, to save a few machine instructions. - * - * The case of a NULL pointer happens especially often after Var_Value, - * since only environment variables need to be freed, but not others. - */ -MAKE_INLINE void -bmake_free(void *p) -{ - if (p != NULL) - free(p); -} |
