Source-Changes-HG archive
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]
[src/trunk]: src/usr.bin/make make: rename local variable in bmake_malloc
details: https://anonhg.NetBSD.org/src/rev/4aed0763d390
branches: trunk
changeset: 359467:4aed0763d390
user: rillig <rillig%NetBSD.org@localhost>
date: Fri Jan 07 08:30:04 2022 +0000
description:
make: rename local variable in bmake_malloc
The length of a string does not include the trailing '\0'.
No binary change.
diffstat:
usr.bin/make/make_malloc.c | 12 ++++++------
1 files changed, 6 insertions(+), 6 deletions(-)
diffs (35 lines):
diff -r 96707e7c4553 -r 4aed0763d390 usr.bin/make/make_malloc.c
--- a/usr.bin/make/make_malloc.c Fri Jan 07 08:28:06 2022 +0000
+++ b/usr.bin/make/make_malloc.c Fri Jan 07 08:30:04 2022 +0000
@@ -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 @@
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. */
Home |
Main Index |
Thread Index |
Old Index