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(1): remove duplicate code in :ts modifier
details: https://anonhg.NetBSD.org/src/rev/f41ee1d25cb9
branches: trunk
changeset: 1012583:f41ee1d25cb9
user: rillig <rillig%NetBSD.org@localhost>
date: Sun Aug 02 20:13:05 2020 +0000
description:
make(1): remove duplicate code in :ts modifier
The pointer xp had already been there with the correct value, and
there's no point in not using it. This reduces the code size on x86_64
by 48 bytes, which is more than I had expected.
diffstat:
usr.bin/make/var.c | 8 ++++----
1 files changed, 4 insertions(+), 4 deletions(-)
diffs (35 lines):
diff -r bd2f576cdfa3 -r f41ee1d25cb9 usr.bin/make/var.c
--- a/usr.bin/make/var.c Sun Aug 02 19:59:17 2020 +0000
+++ b/usr.bin/make/var.c Sun Aug 02 20:13:05 2020 +0000
@@ -1,4 +1,4 @@
-/* $NetBSD: var.c,v 1.406 2020/08/02 19:59:17 rillig Exp $ */
+/* $NetBSD: var.c,v 1.407 2020/08/02 20:13:05 rillig Exp $ */
/*
* Copyright (c) 1988, 1989, 1990, 1993
@@ -69,14 +69,14 @@
*/
#ifndef MAKE_NATIVE
-static char rcsid[] = "$NetBSD: var.c,v 1.406 2020/08/02 19:59:17 rillig Exp $";
+static char rcsid[] = "$NetBSD: var.c,v 1.407 2020/08/02 20:13:05 rillig Exp $";
#else
#include <sys/cdefs.h>
#ifndef lint
#if 0
static char sccsid[] = "@(#)var.c 8.3 (Berkeley) 3/19/94";
#else
-__RCSID("$NetBSD: var.c,v 1.406 2020/08/02 19:59:17 rillig Exp $");
+__RCSID("$NetBSD: var.c,v 1.407 2020/08/02 20:13:05 rillig Exp $");
#endif
#endif /* not lint */
#endif
@@ -2388,7 +2388,7 @@
char *end;
get_numeric:
- st->sep = strtoul(sep + 1 + (sep[1] == 'x'), &end, base);
+ st->sep = strtoul(xp, &end, base);
if (*end != ':' && *end != st->endc)
return AMR_BAD;
st->next = end;
Home |
Main Index |
Thread Index |
Old Index