Skip to content

Commit 0d9207d

Browse files
author
Pavel Siska
committed
fix clnag-format
1 parent d18a8e2 commit 0d9207d

File tree

4 files changed

+11
-9
lines changed

4 files changed

+11
-9
lines changed

src/plugins/input/nfb/src/ndp.cpp

Lines changed: 5 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -14,11 +14,11 @@
1414

1515
#include "parser.hpp"
1616

17+
#include <algorithm>
1718
#include <cstdio>
1819
#include <cstring>
1920
#include <iostream>
2021
#include <memory>
21-
#include <algorithm>
2222
#include <span>
2323

2424
#include <ipfixprobe/pluginFactory/pluginManifest.hpp>
@@ -129,7 +129,7 @@ InputPlugin::Result NdpPacketReader::get(PacketBlock& packets)
129129

130130
packets.cnt = 0;
131131
constexpr size_t maxBurstSize = 64;
132-
size_t burstSize = std::min(packets.size, maxBurstSize);
132+
size_t burstSize = std::min(packets.size, maxBurstSize);
133133
std::span<struct ndp_packet> packetSpan(ndp_packet_burst.get(), burstSize);
134134
std::span<timeval> timestampSpan(timestamps);
135135

@@ -138,7 +138,9 @@ InputPlugin::Result NdpPacketReader::get(PacketBlock& packets)
138138
int received = reader.get_packets(packetSpan, timestampSpan);
139139

140140
if (received < 32) {
141-
std::span<struct ndp_packet> packetSpan(ndp_packet_burst.get() + received, burstSize - received);
141+
std::span<struct ndp_packet> packetSpan(
142+
ndp_packet_burst.get() + received,
143+
burstSize - received);
142144
std::span<timeval> timestampSpan(timestamps.data() + received, burstSize - received);
143145

144146
size_t reader_index = (m_reader_idx++) & (m_readers_count - 1);

src/plugins/input/nfb/src/ndp.hpp

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -14,14 +14,14 @@
1414

1515
#include "ndpReader.hpp"
1616

17+
#include <memory>
18+
#include <span>
19+
1720
#include <ipfixprobe/inputPlugin.hpp>
1821
#include <ipfixprobe/options.hpp>
1922
#include <ipfixprobe/packet.hpp>
2023
#include <ipfixprobe/utils.hpp>
2124

22-
#include <memory>
23-
#include <span>
24-
2525
namespace ipxp {
2626

2727
class NdpOptParser : public OptionsParser {

src/plugins/input/nfb/src/ndpReader.cpp

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -222,8 +222,8 @@ int NdpReader::get_packets(std::span<struct ndp_packet> packets, std::span<timev
222222
} else if (ndk_timestamp_offsets[header_id] == std::numeric_limits<uint32_t>::max()) {
223223
set_sw_timestamp((struct timeval*) &timestamps[i]);
224224
} else {
225-
uint64_t* fw_ts
226-
= (uint64_t*) ((uint8_t*) ndp_packet->header + ndk_timestamp_offsets[header_id]);
225+
uint64_t* fw_ts = (uint64_t*) ((uint8_t*) ndp_packet->header
226+
+ ndk_timestamp_offsets[header_id]);
227227
if (*fw_ts == std::numeric_limits<uint64_t>::max()) {
228228
set_sw_timestamp((struct timeval*) &timestamps[i]);
229229
} else {

src/plugins/input/nfb/src/ndpReader.hpp

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2,14 +2,14 @@
22

33
#include "ndpHeader.hpp"
44

5+
#include <span>
56
#include <string>
67
#include <vector>
78

89
#include <numa.h>
910
#include <stdint.h>
1011
#include <sys/time.h>
1112
#include <unistd.h>
12-
#include <span>
1313

1414
extern "C" {
1515
#include <nfb/ndp.h>

0 commit comments

Comments
 (0)