Module Name: src Committed By: rillig Date: Sat Sep 24 10:19:07 UTC 2022
Modified Files: src/usr.bin/make: cond.c Log Message: make: move Cond_save_depth above Cond_restore_depth This puts the functions into chronological order, as saving happens before restoring. No functional change. To generate a diff of this commit: cvs rdiff -u -r1.339 -r1.340 src/usr.bin/make/cond.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/cond.c diff -u src/usr.bin/make/cond.c:1.339 src/usr.bin/make/cond.c:1.340 --- src/usr.bin/make/cond.c:1.339 Sat Sep 24 10:12:46 2022 +++ src/usr.bin/make/cond.c Sat Sep 24 10:19:07 2022 @@ -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_de 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; }