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: reduce indentation in ApplyModifier_SunShell
details: https://anonhg.NetBSD.org/src/rev/10f991a1fa77
branches: trunk
changeset: 953622:10f991a1fa77
user: rillig <rillig%NetBSD.org@localhost>
date: Sun Mar 14 15:24:37 2021 +0000
description:
make: reduce indentation in ApplyModifier_SunShell
No functional change.
diffstat:
usr.bin/make/var.c | 44 ++++++++++++++++++++++----------------------
1 files changed, 22 insertions(+), 22 deletions(-)
diffs (66 lines):
diff -r 173b7db824ca -r 10f991a1fa77 usr.bin/make/var.c
--- a/usr.bin/make/var.c Sun Mar 14 15:22:21 2021 +0000
+++ b/usr.bin/make/var.c Sun Mar 14 15:24:37 2021 +0000
@@ -1,4 +1,4 @@
-/* $NetBSD: var.c,v 1.862 2021/03/14 15:22:21 rillig Exp $ */
+/* $NetBSD: var.c,v 1.863 2021/03/14 15:24:37 rillig Exp $ */
/*
* Copyright (c) 1988, 1989, 1990, 1993
@@ -140,7 +140,7 @@
#include "metachar.h"
/* "@(#)var.c 8.3 (Berkeley) 3/19/94" */
-MAKE_RCSID("$NetBSD: var.c,v 1.862 2021/03/14 15:22:21 rillig Exp $");
+MAKE_RCSID("$NetBSD: var.c,v 1.863 2021/03/14 15:24:37 rillig Exp $");
typedef enum VarFlags {
VFL_NONE = 0,
@@ -3515,27 +3515,27 @@
{
Expr *expr = st->expr;
const char *p = *pp;
- if (p[1] == 'h' && IsDelimiter(p[2], st)) {
- if (expr->eflags & VARE_WANTRES) {
- const char *errfmt;
- char *output = Cmd_Exec(expr->value.str, &errfmt);
- if (errfmt != NULL)
- Error(errfmt, expr->value.str);
- Expr_SetValueOwn(expr, output);
- } else {
- /*
- * TODO: Check whether returning ":sh" would be
- * more consistent with the other modifiers.
- *
- * TODO: Add a unit test demonstrating that the
- * actual value of this expression has any effect.
- */
- Expr_SetValueRefer(expr, "");
- }
- *pp = p + 2;
- return AMR_OK;
- } else
+ if (!(p[1] == 'h' && IsDelimiter(p[2], st)))
return AMR_UNKNOWN;
+
+ if (expr->eflags & VARE_WANTRES) {
+ const char *errfmt;
+ char *output = Cmd_Exec(expr->value.str, &errfmt);
+ if (errfmt != NULL)
+ Error(errfmt, expr->value.str);
+ Expr_SetValueOwn(expr, output);
+ } else {
+ /*
+ * TODO: Check whether returning ":sh" would be
+ * more consistent with the other modifiers.
+ *
+ * TODO: Add a unit test demonstrating that the
+ * actual value of this expression has any effect.
+ */
+ Expr_SetValueRefer(expr, "");
+ }
+ *pp = p + 2;
+ return AMR_OK;
}
#endif
Home |
Main Index |
Thread Index |
Old Index