From 6e541f9c87e774726ff26a4cf5263d4ab7aba66c Mon Sep 17 00:00:00 2001 From: Eduardo Almeida Date: Tue, 27 Sep 2022 14:18:47 +0100 Subject: [PATCH] network: Isolate variables declaration in NS_PCAP_TEST_EXPECT_EQ() Also convert tabs to spaces. --- src/network/utils/pcap-test.h | 16 +++++++++------- 1 file changed, 9 insertions(+), 7 deletions(-) diff --git a/src/network/utils/pcap-test.h b/src/network/utils/pcap-test.h index 860b488c4..e1f7831de 100644 --- a/src/network/utils/pcap-test.h +++ b/src/network/utils/pcap-test.h @@ -41,14 +41,16 @@ oss << filename; \ std::string expected = CreateDataDirFilename (oss.str()); \ std::string got = CreateTempDirFilename (oss.str()); \ - uint32_t sec(0), usec(0), packets(0); \ - /** \todo support default PcapWriter snap length here */ \ - bool diff = PcapFile::Diff (got, expected, sec, usec, packets); \ + uint32_t sec{0}; \ + uint32_t usec{0}; \ + uint32_t packets{0}; \ + /** \todo support default PcapWriter snap length here */ \ + bool diff = PcapFile::Diff (got, expected, sec, usec, packets); \ NS_TEST_EXPECT_MSG_EQ (diff, false, \ - "PCAP traces " \ - << got << " and " << expected \ - << " differ starting from packet " \ - << packets << " at " << sec << " s " \ + "PCAP traces " \ + << got << " and " << expected \ + << " differ starting from packet " \ + << packets << " at " << sec << " s " \ << usec << " us"); \ } while (false)