summaryrefslogtreecommitdiff
path: root/src/lib/util.cc
diff options
context:
space:
mode:
authorCarl Hetherington <cth@carlh.net>2024-12-15 00:25:16 +0100
committerCarl Hetherington <cth@carlh.net>2024-12-15 00:25:16 +0100
commitc5a102325c3f4ac5e094f40f2215438e075f20d6 (patch)
treead464ab3f692e060336d5a879544f870929bb83c /src/lib/util.cc
parent13fca972788b4b907e55a650a43a1b8318894e74 (diff)
Use an in-place if.
Diffstat (limited to 'src/lib/util.cc')
-rw-r--r--src/lib/util.cc3
1 files changed, 1 insertions, 2 deletions
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;
}
}