diff --git a/inc/post_code.hpp b/inc/post_code.hpp
index 498a0d8..be800f2 100644
--- a/inc/post_code.hpp
+++ b/inc/post_code.hpp
@@ -72,7 +72,7 @@
 {
     void operator()(sd_event *event) const
     {
-        event = sd_event_unref(event);
+        sd_event_unref(event);
     }
 };
 using EventPtr = std::unique_ptr<sd_event, EventDeleter>;
diff --git a/src/post_code.cpp b/src/post_code.cpp
index 4b14ca1..3633ea2 100644
--- a/src/post_code.cpp
+++ b/src/post_code.cpp
@@ -39,8 +39,9 @@
     std::vector<postcode_t> codesVec;
     if (1 == index && !postCodes.empty())
     {
-        for (auto& code : postCodes)
-            codesVec.push_back(code.second);
+        std::transform(postCodes.begin(), postCodes.end(),
+                       std::back_inserter(codesVec),
+                       [](const auto& kv) { return kv.second; });
     }
     else
     {
@@ -49,8 +50,8 @@
         decltype(postCodes) codes;
         deserializePostCodes(
             fs::path(strPostCodeListPath + std::to_string(bootNum)), codes);
-        for (std::pair<uint64_t, postcode_t> code : codes)
-            codesVec.push_back(code.second);
+        std::transform(codes.begin(), codes.end(), std::back_inserter(codesVec),
+                       [](const auto& kv) { return kv.second; });
     }
     return codesVec;
 }
@@ -72,7 +73,6 @@
 
 void PostCode::savePostCodes(postcode_t code)
 {
-    uint64_t usTimeOffset = 0;
     // steady_clock is a monotonic clock that is guaranteed to never be adjusted
     auto postCodeTimeSteady = std::chrono::steady_clock::now();
     uint64_t tsUS = std::chrono::duration_cast<std::chrono::microseconds>(
@@ -88,9 +88,10 @@
     else
     {
         // calculating tsUS so it is monotonic within the same boot
-        usTimeOffset = std::chrono::duration_cast<std::chrono::microseconds>(
-                           postCodeTimeSteady - firstPostCodeTimeSteady)
-                           .count();
+        uint64_t usTimeOffset =
+            std::chrono::duration_cast<std::chrono::microseconds>(
+                postCodeTimeSteady - firstPostCodeTimeSteady)
+                .count();
         tsUS = usTimeOffset + firstPostCodeUsSinceEpoch;
     }
 
