summaryrefslogtreecommitdiff
path: root/make_malloc.c
diff options
context:
space:
mode:
authorSimon J. Gerraty <sjg@FreeBSD.org>2022-02-05 20:03:50 +0000
committerSimon J. Gerraty <sjg@FreeBSD.org>2022-02-05 20:03:50 +0000
commitcdde9e894dee2074ef0dd12ddc171e5d3f1513e3 (patch)
treeffa1b3cea06486f9780c271c39db0bc2e7b006e9 /make_malloc.c
parent2935fe8237c83c1dcb113dd5335733263e68e6fd (diff)
Diffstat (limited to 'make_malloc.c')
-rw-r--r--make_malloc.c12
1 files changed, 6 insertions, 6 deletions
diff --git a/make_malloc.c b/make_malloc.c
index 42a69f43704f..ea347e0ec2ca 100644
--- a/make_malloc.c
+++ b/make_malloc.c
@@ -1,4 +1,4 @@
-/* $NetBSD: make_malloc.c,v 1.25 2021/01/19 20:51:46 rillig Exp $ */
+/* $NetBSD: make_malloc.c,v 1.26 2022/01/07 08:30:04 rillig Exp $ */
/*
* Copyright (c) 2009 The NetBSD Foundation, Inc.
@@ -30,7 +30,7 @@
#include "make.h"
-MAKE_RCSID("$NetBSD: make_malloc.c,v 1.25 2021/01/19 20:51:46 rillig Exp $");
+MAKE_RCSID("$NetBSD: make_malloc.c,v 1.26 2022/01/07 08:30:04 rillig Exp $");
#ifndef USE_EMALLOC
@@ -57,12 +57,12 @@ bmake_malloc(size_t len)
char *
bmake_strdup(const char *str)
{
- size_t len;
+ size_t size;
char *p;
- len = strlen(str) + 1;
- p = bmake_malloc(len);
- return memcpy(p, str, len);
+ size = strlen(str) + 1;
+ p = bmake_malloc(size);
+ return memcpy(p, str, size);
}
/* Allocate a string starting from str with exactly len characters. */