summaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
Diffstat (limited to 'src')
-rw-r--r--src/libcamera/base/log.cpp6
1 files changed, 1 insertions, 5 deletions
diff --git a/src/libcamera/base/log.cpp b/src/libcamera/base/log.cpp
index 64813b66..df84ba4e 100644
--- a/src/libcamera/base/log.cpp
+++ b/src/libcamera/base/log.cpp
@@ -477,15 +477,11 @@ int Logger::logSetStream(std::ostream *stream)
*/
int Logger::logSetTarget(enum LoggingTarget target)
{
- std::shared_ptr<LogOutput> output;
-
switch (target) {
case LoggingTargetSyslog:
- output = std::make_shared<LogOutput>();
- std::atomic_store(&output_, output);
+ std::atomic_store(&output_, std::make_shared<LogOutput>());
break;
case LoggingTargetNone:
- output = nullptr;
std::atomic_store(&output_, std::shared_ptr<LogOutput>());
break;
default: