diff options
| author | rillig <rillig@NetBSD.org> | 2020-12-07 22:37:18 +0000 |
|---|---|---|
| committer | rillig <rillig@NetBSD.org> | 2020-12-07 22:37:18 +0000 |
| commit | 1c6841a4d298da6da1ff9f679caa9bfcb0022047 (patch) | |
| tree | 9c946136cffaa614abdb9f16e5fe5395738ffdc0 /usr.bin/make/make_malloc.c | |
| parent | 5809692d1395e188642898e71cb2a06544976450 (diff) | |
make(1): remove duplicate code from bmake_strdup
Inlining is the job of the compiler, not of humans.
Diffstat (limited to 'usr.bin/make/make_malloc.c')
| -rw-r--r-- | usr.bin/make/make_malloc.c | 7 |
1 files changed, 3 insertions, 4 deletions
diff --git a/usr.bin/make/make_malloc.c b/usr.bin/make/make_malloc.c index 9a8570b6a2b..62cbb0a5cc0 100644 --- a/usr.bin/make/make_malloc.c +++ b/usr.bin/make/make_malloc.c @@ -1,4 +1,4 @@ -/* $NetBSD: make_malloc.c,v 1.23 2020/10/05 19:27:47 rillig Exp $ */ +/* $NetBSD: make_malloc.c,v 1.24 2020/12/07 22:37:18 rillig Exp $ */ /*- * Copyright (c) 2009 The NetBSD Foundation, Inc. @@ -30,7 +30,7 @@ #include "make.h" -MAKE_RCSID("$NetBSD: make_malloc.c,v 1.23 2020/10/05 19:27:47 rillig Exp $"); +MAKE_RCSID("$NetBSD: make_malloc.c,v 1.24 2020/12/07 22:37:18 rillig Exp $"); #ifndef USE_EMALLOC @@ -61,8 +61,7 @@ bmake_strdup(const char *str) char *p; len = strlen(str) + 1; - if ((p = malloc(len)) == NULL) - enomem(); + p = bmake_malloc(len); return memcpy(p, str, len); } |
