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: move Cond_save_depth above Cond_restore_d...



details:   https://anonhg.NetBSD.org/src/rev/7cf5caeda59e
branches:  trunk
changeset: 370677:7cf5caeda59e
user:      rillig <rillig%NetBSD.org@localhost>
date:      Sat Sep 24 10:19:07 2022 +0000

description:
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:

 usr.bin/make/cond.c |  24 ++++++++++++------------
 1 files changed, 12 insertions(+), 12 deletions(-)

diffs (57 lines):

diff -r dc6d076d3b75 -r 7cf5caeda59e usr.bin/make/cond.c
--- a/usr.bin/make/cond.c       Sat Sep 24 10:12:46 2022 +0000
+++ b/usr.bin/make/cond.c       Sat Sep 24 10:19:07 2022 +0000
@@ -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 @@
        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_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 @@
 void
 Cond_reset_depth(void)
 {
-    cond_depth = cond_min_depth;
+       cond_depth = cond_min_depth;
 }



Home | Main Index | Thread Index | Old Index