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): use consistent name for result of Cmd_...
details: https://anonhg.NetBSD.org/src/rev/03bd6041e251
branches: trunk
changeset: 974638:03bd6041e251
user: rillig <rillig%NetBSD.org@localhost>
date: Thu Aug 06 17:51:21 2020 +0000
description:
make(1): use consistent name for result of Cmd_Exec
diffstat:
usr.bin/make/var.c | 32 ++++++++++++++++----------------
1 files changed, 16 insertions(+), 16 deletions(-)
diffs (85 lines):
diff -r d8a850096d9e -r 03bd6041e251 usr.bin/make/var.c
--- a/usr.bin/make/var.c Thu Aug 06 17:48:41 2020 +0000
+++ b/usr.bin/make/var.c Thu Aug 06 17:51:21 2020 +0000
@@ -1,4 +1,4 @@
-/* $NetBSD: var.c,v 1.415 2020/08/06 17:48:41 rillig Exp $ */
+/* $NetBSD: var.c,v 1.416 2020/08/06 17:51:21 rillig Exp $ */
/*
* Copyright (c) 1988, 1989, 1990, 1993
@@ -69,14 +69,14 @@
*/
#ifndef MAKE_NATIVE
-static char rcsid[] = "$NetBSD: var.c,v 1.415 2020/08/06 17:48:41 rillig Exp $";
+static char rcsid[] = "$NetBSD: var.c,v 1.416 2020/08/06 17:51:21 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.415 2020/08/06 17:48:41 rillig Exp $");
+__RCSID("$NetBSD: var.c,v 1.416 2020/08/06 17:51:21 rillig Exp $");
#endif
#endif /* not lint */
#endif
@@ -2136,7 +2136,7 @@
{
char delim;
char *cmd;
- const char *emsg;
+ const char *errfmt;
(*pp)++;
delim = '!';
@@ -2147,15 +2147,15 @@
return AMR_CLEANUP;
}
- emsg = NULL;
+ errfmt = NULL;
if (st->eflags & VARE_WANTRES)
- st->newVal = Cmd_Exec(cmd, &emsg);
+ st->newVal = Cmd_Exec(cmd, &errfmt);
else
st->newVal = varNoError;
free(cmd);
- if (emsg != NULL)
- Error(emsg, st->val); /* XXX: why still return AMR_OK? */
+ if (errfmt != NULL)
+ Error(errfmt, st->val); /* XXX: why still return AMR_OK? */
if (st->v->flags & VAR_JUNK)
st->v->flags |= VAR_KEEP;
@@ -2845,10 +2845,10 @@
Var_Append(st->v->name, val, v_ctxt);
break;
case '!': {
- const char *emsg;
- char *cmd_output = Cmd_Exec(val, &emsg);
- if (emsg)
- Error(emsg, st->val);
+ const char *errfmt;
+ char *cmd_output = Cmd_Exec(val, &errfmt);
+ if (errfmt)
+ Error(errfmt, st->val);
else
Var_Set(st->v->name, cmd_output, v_ctxt);
free(cmd_output);
@@ -3216,10 +3216,10 @@
case 's':
if (p[1] == 'h' && (p[2] == st.endc || p[2] == ':')) {
if (st.eflags & VARE_WANTRES) {
- const char *emsg;
- st.newVal = Cmd_Exec(st.val, &emsg);
- if (emsg)
- Error(emsg, st.val);
+ const char *errfmt;
+ st.newVal = Cmd_Exec(st.val, &errfmt);
+ if (errfmt)
+ Error(errfmt, st.val);
} else
st.newVal = varNoError;
p += 2;
Home |
Main Index |
Thread Index |
Old Index