summaryrefslogtreecommitdiff
path: root/usr.bin/make
diff options
context:
space:
mode:
authorrillig <rillig@NetBSD.org>2022-09-24 10:19:07 +0000
committerrillig <rillig@NetBSD.org>2022-09-24 10:19:07 +0000
commitcf644a6927a3531c01ab124ea2e4be287a4f8dfa (patch)
tree0d03de835bf1fe8da3b99fabd1c549cfcd2b392b /usr.bin/make
parent62583da27332ab2897430054bfd5a0aeaf86b675 (diff)
make: move Cond_save_depth above Cond_restore_depth
This puts the functions into chronological order, as saving happens before restoring. No functional change.
Diffstat (limited to 'usr.bin/make')
-rw-r--r--usr.bin/make/cond.c24
1 files changed, 12 insertions, 12 deletions
diff --git a/usr.bin/make/cond.c b/usr.bin/make/cond.c
index 67a887ccf29..88c0389277d 100644
--- a/usr.bin/make/cond.c
+++ b/usr.bin/make/cond.c
@@ -1,4 +1,4 @@
-/* $NetBSD: cond.c,v 1.339 2022/09/24 10:12:46 rillig Exp $ */
+/* $NetBSD: cond.c,v 1.340 2022/09/24 10:19:07 rillig Exp $ */
/*
* Copyright (c) 1988, 1989, 1990 The Regents of the University of California.
@@ -95,7 +95,7 @@
#include "dir.h"
/* "@(#)cond.c 8.2 (Berkeley) 1/2/94" */
-MAKE_RCSID("$NetBSD: cond.c,v 1.339 2022/09/24 10:12:46 rillig Exp $");
+MAKE_RCSID("$NetBSD: cond.c,v 1.340 2022/09/24 10:19:07 rillig Exp $");
/*
* Conditional expressions conform to this grammar:
@@ -1255,6 +1255,15 @@ Cond_EvalLine(const char *line)
return res;
}
+unsigned int
+Cond_save_depth(void)
+{
+ unsigned int depth = cond_min_depth;
+
+ cond_min_depth = cond_depth;
+ return depth;
+}
+
void
Cond_restore_depth(unsigned int saved_depth)
{
@@ -1270,15 +1279,6 @@ Cond_restore_depth(unsigned int saved_depth)
cond_min_depth = saved_depth;
}
-unsigned int
-Cond_save_depth(void)
-{
- unsigned int depth = cond_min_depth;
-
- cond_min_depth = cond_depth;
- return depth;
-}
-
/*
* When we break out of a .for loop
* we want to restore cond_depth to where it was
@@ -1287,5 +1287,5 @@ Cond_save_depth(void)
void
Cond_reset_depth(void)
{
- cond_depth = cond_min_depth;
+ cond_depth = cond_min_depth;
}