From 9a9d5da11fa6033f82dcf8e2298aee29587f5396 Mon Sep 17 00:00:00 2001 From: Ryan Ofsky Date: Mon, 27 Feb 2023 14:21:13 -0500 Subject: refactor: Stop using gArgs global in system.cpp Most of the code in util/system.cpp that was hardcoded to use the global ArgsManager instance `gArgs` has been changed to work with explicit ArgsManager instances (for example in https://github.com/bitcoin/bitcoin/pull/20092). But a few hardcoded references to `gArgs` remain. This commit removes the last ones so these functions aren't reading or writing global state. --- src/init.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'src/init.cpp') diff --git a/src/init.cpp b/src/init.cpp index 4e06d44cb0..281e0d4966 100644 --- a/src/init.cpp +++ b/src/init.cpp @@ -148,7 +148,7 @@ static const char* BITCOIN_PID_FILENAME = "bitcoind.pid"; static fs::path GetPidFile(const ArgsManager& args) { - return AbsPathForConfigVal(args.GetPathArg("-pid", BITCOIN_PID_FILENAME)); + return AbsPathForConfigVal(args, args.GetPathArg("-pid", BITCOIN_PID_FILENAME)); } [[nodiscard]] static bool CreatePidFile(const ArgsManager& args) -- cgit v1.2.3