Module Name: src Committed By: rillig Date: Mon Jul 27 22:21:29 UTC 2020
Modified Files: src/usr.bin/make: var.c Log Message: make(1): remove unnecessary variable assignment It is not the job of an ApplyModifier function to directly manipulate the final result of the ApplyModifiers function. In fact, the resulting pointer was overwritten unconditionally, in such an obvious way that the compiler could have detected this. GCC 5 didn't though, which reduces the code size a bit. To generate a diff of this commit: cvs rdiff -u -r1.341 -r1.342 src/usr.bin/make/var.c Please note that diffs are not public domain; they are subject to the copyright notices on the relevant files.
Modified files: Index: src/usr.bin/make/var.c diff -u src/usr.bin/make/var.c:1.341 src/usr.bin/make/var.c:1.342 --- src/usr.bin/make/var.c:1.341 Mon Jul 27 22:02:26 2020 +++ src/usr.bin/make/var.c Mon Jul 27 22:21:29 2020 @@ -1,4 +1,4 @@ -/* $NetBSD: var.c,v 1.341 2020/07/27 22:02:26 rillig Exp $ */ +/* $NetBSD: var.c,v 1.342 2020/07/27 22:21:29 rillig Exp $ */ /* * Copyright (c) 1988, 1989, 1990, 1993 @@ -69,14 +69,14 @@ */ #ifndef MAKE_NATIVE -static char rcsid[] = "$NetBSD: var.c,v 1.341 2020/07/27 22:02:26 rillig Exp $"; +static char rcsid[] = "$NetBSD: var.c,v 1.342 2020/07/27 22:21:29 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.341 2020/07/27 22:02:26 rillig Exp $"); +__RCSID("$NetBSD: var.c,v 1.342 2020/07/27 22:21:29 rillig Exp $"); #endif #endif /* not lint */ #endif @@ -2510,7 +2510,6 @@ ApplyModifier_Regex(const char *mod, App int error = regcomp(&args.re, re, REG_EXTENDED); free(re); if (error) { - *st->lengthPtr = st->cp - st->start + 1; VarREError(error, &args.re, "RE substitution error"); free(args.replace); return FALSE;