af_packet: Minor improvements to fix compiler warnings.

This commit is contained in:
Jan Grashoefer 2019-01-09 17:47:06 +01:00 committed by Tim Wojtulewicz
parent b6e52b262c
commit 9cc01769b4
2 changed files with 3 additions and 3 deletions

View file

@ -40,7 +40,7 @@ void AF_PacketSource::Open()
// Create RX-ring
try {
rx_ring = new RX_Ring(socket_fd, buffer_size);
} catch (RX_RingException e) {
} catch (RX_RingException& e) {
Error(errno ? strerror(errno) : "unable to create RX-ring");
close(socket_fd);
return;
@ -80,7 +80,7 @@ void AF_PacketSource::Open()
props.is_live = true;
props.link_type = DLT_EN10MB; // Ethernet headers
memset(&stats, 0, sizeof(stats));
stats.received = stats.dropped = stats.link = stats.bytes_received = 0;
num_discarded = 0;
Opened(props);

View file

@ -11,7 +11,7 @@ class Plugin : public ::plugin::Plugin
{
protected:
// Overridden from plugin::Plugin.
virtual plugin::Configuration Configure();
plugin::Configuration Configure() override;
};
extern Plugin plugin;