diff --git a/daemon/face/lp-fragmenter.cpp b/daemon/face/lp-fragmenter.cpp
index 7494ca7..6b1755a 100644
--- a/daemon/face/lp-fragmenter.cpp
+++ b/daemon/face/lp-fragmenter.cpp
@@ -1,6 +1,6 @@
 /* -*- Mode:C++; c-file-style:"gnu"; indent-tabs-mode:nil; -*- */
 /*
- * Copyright (c) 2014-2018,  Regents of the University of California,
+ * Copyright (c) 2014-2022,  Regents of the University of California,
  *                           Arizona Board of Regents,
  *                           Colorado State University,
  *                           University Pierre & Marie Curie, Sorbonne University,
@@ -39,18 +39,18 @@
 static_assert(lp::tlv::FragCount < 253, "FragCount TLV-TYPE must fit in 1 octet");
 static_assert(lp::tlv::Fragment < 253, "Fragment TLV-TYPE must fit in 1 octet");
 
-/** \brief maximum overhead on a single fragment,
- *         not counting other NDNLPv2 headers
+/**
+ * \brief Maximum overhead on a single fragment, not counting other NDNLPv2 headers.
  */
-static const size_t MAX_SINGLE_FRAG_OVERHEAD =
+const size_t MAX_SINGLE_FRAG_OVERHEAD =
   1 + 9 + // LpPacket TLV-TYPE and TLV-LENGTH
   1 + 1 + 8 + // Sequence TLV
   1 + 9; // Fragment TLV-TYPE and TLV-LENGTH
 
-/** \brief maximum overhead of adding fragmentation to payload,
- *         not counting other NDNLPv2 headers
+/**
+ * \brief Maximum overhead of adding fragmentation to payload, not counting other NDNLPv2 headers.
  */
-static const size_t MAX_FRAG_OVERHEAD =
+const size_t MAX_FRAG_OVERHEAD =
   1 + 9 + // LpPacket TLV-TYPE and TLV-LENGTH
   1 + 1 + 8 + // Sequence TLV
   1 + 1 + 8 + // FragIndex TLV
@@ -86,18 +86,17 @@
     // fast path: fragmentation not needed
     // To qualify for fast path, the packet must have space for adding a sequence number,
     // because another NDNLPv2 feature may require the sequence number.
-    return std::make_tuple(true, std::vector<lp::Packet>{packet});
+    return {true, {packet}};
   }
 
-  ndn::Buffer::const_iterator netPktBegin, netPktEnd;
-  std::tie(netPktBegin, netPktEnd) = packet.get<lp::FragmentField>();
+  auto [netPktBegin, netPktEnd] = packet.get<lp::FragmentField>();
   size_t netPktSize = std::distance(netPktBegin, netPktEnd);
 
   // compute size of other NDNLPv2 headers to be placed on the first fragment
   size_t firstHeaderSize = 0;
-  const Block& packetWire = packet.wireEncode();
+  const auto& packetWire = packet.wireEncode();
   if (packetWire.type() == lp::tlv::LpPacket) {
-    for (const Block& element : packetWire.elements()) {
+    for (const auto& element : packetWire.elements()) {
       if (element.type() != lp::tlv::Fragment) {
         firstHeaderSize += element.size();
       }
@@ -107,7 +106,7 @@
   // compute payload size
   if (MAX_FRAG_OVERHEAD + firstHeaderSize + 1 > mtu) { // 1-octet fragment
     NFD_LOG_FACE_WARN("fragmentation error, MTU too small for first fragment: DROP");
-    return std::make_tuple(false, std::vector<lp::Packet>{});
+    return {false, {}};
   }
   size_t firstPayloadSize = std::min(netPktSize, mtu - firstHeaderSize - MAX_FRAG_OVERHEAD);
   size_t payloadSize = mtu - MAX_FRAG_OVERHEAD;
@@ -117,7 +116,7 @@
   // compute FragCount
   if (fragCount > m_options.nMaxFragments) {
     NFD_LOG_FACE_WARN("fragmentation error, FragCount over limit: DROP");
-    return std::make_tuple(false, std::vector<lp::Packet>{});
+    return {false, {}};
   }
 
   // populate fragments
@@ -139,7 +138,7 @@
   }
   BOOST_ASSERT(fragIndex == fragCount);
 
-  return std::make_tuple(true, frags);
+  return {true, frags};
 }
 
 std::ostream&
