summaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
authorCarl Hetherington <cth@carlh.net>2025-11-13 00:55:28 +0100
committerCarl Hetherington <cth@carlh.net>2025-11-14 21:09:52 +0100
commit1543195d9a73bc315c7a348d6d4a396fc191d85c (patch)
treed33504006a9363f1a22b398936410c515ab5d230 /src
parent1ddb7ded7f33f125a5db165a1d2b04e671cd86ee (diff)
Cleanup: compress a couple of ifs.
Diffstat (limited to 'src')
-rw-r--r--src/lib/config.cc6
1 files changed, 2 insertions, 4 deletions
diff --git a/src/lib/config.cc b/src/lib/config.cc
index 9c884670f..267831341 100644
--- a/src/lib/config.cc
+++ b/src/lib/config.cc
@@ -491,8 +491,7 @@ try
_signer_chain = create_certificate_chain();
}
- auto decryption = f.optional_node_child("Decryption");
- if (decryption) {
+ if (auto decryption = f.optional_node_child("Decryption")) {
auto c = make_shared<dcp::CertificateChain>();
for (auto i: decryption->node_children("Certificate")) {
c->add(dcp::Certificate(i->content ()));
@@ -513,8 +512,7 @@ try
}
}
- auto bad = check_certificates();
- if (bad) {
+ if (auto bad = check_certificates()) {
auto const remake = Bad(*bad);
if (remake && *remake) {
switch (*bad) {