diff options
| author | rillig <rillig@NetBSD.org> | 2020-10-19 23:43:55 +0000 |
|---|---|---|
| committer | rillig <rillig@NetBSD.org> | 2020-10-19 23:43:55 +0000 |
| commit | 060d570e83d9d1cdba810db99fb8072d725eaa8f (patch) | |
| tree | a00e07dc3a5203e3441bc2d339cbf005c856ad9e /usr.bin/make/make_malloc.h | |
| parent | efec0500c0414e7913b2444fcc6d37644b1865c6 (diff) | |
make(1): clean up headers, no functional change
Diffstat (limited to 'usr.bin/make/make_malloc.h')
| -rw-r--r-- | usr.bin/make/make_malloc.h | 14 |
1 files changed, 7 insertions, 7 deletions
diff --git a/usr.bin/make/make_malloc.h b/usr.bin/make/make_malloc.h index 492ff0b6961..aa03f380070 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.11 2020/09/13 15:27:25 rillig Exp $ */ +/* $NetBSD: make_malloc.h,v 1.12 2020/10/19 23:43:55 rillig Exp $ */ /*- * Copyright (c) 2009 The NetBSD Foundation, Inc. @@ -33,16 +33,16 @@ char *bmake_strdup(const char *); char *bmake_strldup(const char *, size_t); #else #include <util.h> -#define bmake_malloc(x) emalloc(x) -#define bmake_realloc(x,y) erealloc(x,y) -#define bmake_strdup(x) estrdup(x) -#define bmake_strldup(x,y) estrndup(x,y) +#define bmake_malloc(n) emalloc(n) +#define bmake_realloc(p, n) erealloc(p, n) +#define bmake_strdup(s) estrdup(s) +#define bmake_strldup(s, n) estrndup(s, n) #endif + char *bmake_strsedup(const char *, const char *); /* Thin wrapper around free(3) to avoid the extra function call in case - * p is NULL, which on x86_64 costs about 12 machine instructions. - * Other platforms are similarly affected. + * 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. */ |
