From 95c1ff8eb61e6289c124008e7518b82821322eb6 Mon Sep 17 00:00:00 2001 From: Laurent Pinchart Date: Wed, 25 May 2022 16:32:39 +0300 Subject: libcamera: base: log: Remove unnecessary local variable The output local variable in Logger::logSetTarget() isn't necessary. Remove it. Signed-off-by: Laurent Pinchart Reviewed-by: Umang Jain Reviewed-by: Paul Elder --- src/libcamera/base/log.cpp | 6 +----- 1 file changed, 1 insertion(+), 5 deletions(-) (limited to 'src') 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 output; - switch (target) { case LoggingTargetSyslog: - output = std::make_shared(); - std::atomic_store(&output_, output); + std::atomic_store(&output_, std::make_shared()); break; case LoggingTargetNone: - output = nullptr; std::atomic_store(&output_, std::shared_ptr()); break; default: -- cgit v1.2.1