diff --git a/src/ipmiblob/blob_errors.hpp b/src/ipmiblob/blob_errors.hpp
index 78c9a66..1aecfbf 100644
--- a/src/ipmiblob/blob_errors.hpp
+++ b/src/ipmiblob/blob_errors.hpp
@@ -9,7 +9,7 @@
 class BlobException : public std::exception
 {
   public:
-    explicit BlobException(const std::string& message) : message(message){};
+    explicit BlobException(const std::string& message) : message(message) {};
 
     virtual const char* what() const noexcept override
     {
diff --git a/src/ipmiblob/blob_handler.cpp b/src/ipmiblob/blob_handler.cpp
index fb797ff..362e264 100644
--- a/src/ipmiblob/blob_handler.cpp
+++ b/src/ipmiblob/blob_handler.cpp
@@ -42,9 +42,8 @@
     return std::make_unique<BlobHandler>(std::move(ipmi));
 }
 
-std::vector<std::uint8_t>
-    BlobHandler::sendIpmiPayload(BlobOEMCommands command,
-                                 const std::vector<std::uint8_t>& payload)
+std::vector<std::uint8_t> BlobHandler::sendIpmiPayload(
+    BlobOEMCommands command, const std::vector<std::uint8_t>& payload)
 {
     std::vector<std::uint8_t> request, reply, bytes;
 
@@ -195,8 +194,8 @@
 {
     std::vector<std::uint8_t> payload;
 
-    payload.reserve(sizeof(std::uint16_t) + sizeof(std::uint32_t) +
-                    bytes.size());
+    payload.reserve(
+        sizeof(std::uint16_t) + sizeof(std::uint32_t) + bytes.size());
 
     auto data = reinterpret_cast<const std::uint8_t*>(&session);
     std::copy(data, data + sizeof(std::uint16_t), std::back_inserter(payload));
@@ -246,8 +245,8 @@
     static constexpr std::size_t blobStateSize = sizeof(meta.blob_state);
     static constexpr std::size_t metaSize = sizeof(meta.size);
     static constexpr std::size_t metaOffset = blobStateSize + metaSize;
-    static constexpr std::size_t minRespSize = metaOffset +
-                                               sizeof(std::uint8_t);
+    static constexpr std::size_t minRespSize =
+        metaOffset + sizeof(std::uint8_t);
     std::vector<std::uint8_t> resp;
 
     try
@@ -377,14 +376,13 @@
     return false;
 }
 
-std::vector<std::uint8_t> BlobHandler::readBytes(std::uint16_t session,
-                                                 std::uint32_t offset,
-                                                 std::uint32_t length)
+std::vector<std::uint8_t> BlobHandler::readBytes(
+    std::uint16_t session, std::uint32_t offset, std::uint32_t length)
 {
     std::vector<std::uint8_t> payload;
 
-    payload.reserve(sizeof(std::uint16_t) + sizeof(std::uint32_t) +
-                    sizeof(std::uint32_t));
+    payload.reserve(
+        sizeof(std::uint16_t) + sizeof(std::uint32_t) + sizeof(std::uint32_t));
 
     auto data = reinterpret_cast<const std::uint8_t*>(&session);
     std::copy(data, data + sizeof(std::uint16_t), std::back_inserter(payload));
diff --git a/src/ipmiblob/blob_handler.hpp b/src/ipmiblob/blob_handler.hpp
index a9e6ef4..dddf41b 100644
--- a/src/ipmiblob/blob_handler.hpp
+++ b/src/ipmiblob/blob_handler.hpp
@@ -21,7 +21,7 @@
         CreateBlobHandler(std::unique_ptr<IpmiInterface> ipmi);
 
     explicit BlobHandler(std::unique_ptr<IpmiInterface> ipmi) :
-        ipmi(std::move(ipmi)){};
+        ipmi(std::move(ipmi)) {};
 
     ~BlobHandler() = default;
     BlobHandler(const BlobHandler&) = delete;
@@ -101,9 +101,8 @@
      * @return the bytes returned from the ipmi interface.
      * @throws BlobException.
      */
-    std::vector<std::uint8_t>
-        sendIpmiPayload(BlobOEMCommands command,
-                        const std::vector<std::uint8_t>& payload);
+    std::vector<std::uint8_t> sendIpmiPayload(
+        BlobOEMCommands command, const std::vector<std::uint8_t>& payload);
 
     /**
      * Generic blob byte writer.
diff --git a/src/ipmiblob/blob_interface.hpp b/src/ipmiblob/blob_interface.hpp
index c527fba..5326dc1 100644
--- a/src/ipmiblob/blob_interface.hpp
+++ b/src/ipmiblob/blob_interface.hpp
@@ -138,9 +138,8 @@
      * @return the bytes read
      * @throws BlobException on failure.
      */
-    virtual std::vector<std::uint8_t> readBytes(std::uint16_t session,
-                                                std::uint32_t offset,
-                                                std::uint32_t length) = 0;
+    virtual std::vector<std::uint8_t> readBytes(
+        std::uint16_t session, std::uint32_t offset, std::uint32_t length) = 0;
 };
 
 } // namespace ipmiblob
diff --git a/src/ipmiblob/ipmi_errors.hpp b/src/ipmiblob/ipmi_errors.hpp
index b17db3d..92e8274 100644
--- a/src/ipmiblob/ipmi_errors.hpp
+++ b/src/ipmiblob/ipmi_errors.hpp
@@ -11,7 +11,7 @@
 {
   public:
     IpmiException(const std::string& message, int code) :
-        _message(message), _ccode(code){};
+        _message(message), _ccode(code) {};
 
     static std::string messageFromIpmi(int cc)
     {
diff --git a/src/ipmiblob/ipmi_handler.cpp b/src/ipmiblob/ipmi_handler.cpp
index dd53af5..ef9a226 100644
--- a/src/ipmiblob/ipmi_handler.cpp
+++ b/src/ipmiblob/ipmi_handler.cpp
@@ -71,9 +71,8 @@
     }
 }
 
-std::vector<std::uint8_t>
-    IpmiHandler::sendPacket(std::uint8_t netfn, std::uint8_t cmd,
-                            std::vector<std::uint8_t>& data)
+std::vector<std::uint8_t> IpmiHandler::sendPacket(
+    std::uint8_t netfn, std::uint8_t cmd, std::vector<std::uint8_t>& data)
 {
     open();
 
diff --git a/src/ipmiblob/ipmi_handler.hpp b/src/ipmiblob/ipmi_handler.hpp
index 2564e37..1fbf5b6 100644
--- a/src/ipmiblob/ipmi_handler.hpp
+++ b/src/ipmiblob/ipmi_handler.hpp
@@ -20,7 +20,7 @@
     static std::unique_ptr<IpmiInterface> CreateIpmiHandler();
 
     explicit IpmiHandler(std::unique_ptr<internal::Sys> sys) :
-        sys(std::move(sys)){};
+        sys(std::move(sys)) {};
 
     ~IpmiHandler() = default;
     IpmiHandler(const IpmiHandler&) = delete;
