From c5a102325c3f4ac5e094f40f2215438e075f20d6 Mon Sep 17 00:00:00 2001 From: Carl Hetherington Date: Sun, 15 Dec 2024 00:25:16 +0100 Subject: Use an in-place if. --- src/lib/util.cc | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) (limited to 'src') diff --git a/src/lib/util.cc b/src/lib/util.cc index 105f109a3..c13d292fd 100644 --- a/src/lib/util.cc +++ b/src/lib/util.cc @@ -1134,8 +1134,7 @@ setup_grok_library_path() { static std::string old_path; if (old_path.empty()) { - auto const old = getenv("LD_LIBRARY_PATH"); - if (old) { + if (auto const old = getenv("LD_LIBRARY_PATH")) { old_path = old; } } -- cgit v1.2.3