Skip to content

Commit

Permalink
TEST: off older master - needs formatting
Browse files Browse the repository at this point in the history
  • Loading branch information
roligugus committed Jul 10, 2020
1 parent 6658482 commit da24e87
Showing 1 changed file with 3 additions and 7 deletions.
10 changes: 3 additions & 7 deletions src/source-pcap.c
Original file line number Diff line number Diff line change
Expand Up @@ -50,7 +50,7 @@
/**
* \brief Structure to hold thread specific variables.
*/
typedef struct PcapThreadVars_
typedef struct PcapThreadVars_
{
/* thread specific handle */
pcap_t *pcap_handle;
Expand All @@ -67,9 +67,7 @@ typedef struct PcapThreadVars_
int datalink;

/* counters */
uint32_t pkts;
uint64_t bytes;
uint32_t errs;
uint32_t pkts; uint64_t bytes; uint32_t errs;

uint16_t capture_kernel_packets;
uint16_t capture_kernel_drops;
Expand Down Expand Up @@ -179,9 +177,7 @@ static void PcapCallbackLoop(char *user, struct pcap_pkthdr *h, u_char *pkt)
Packet *p = PacketGetFromQueueOrAlloc();
struct timeval current_time;

if (unlikely(p == NULL)) {
SCReturn;
}
if (unlikely(p == NULL)) { SCReturn; }

PKT_SET_SRC(p, PKT_SRC_WIRE);
p->ts.tv_sec = h->ts.tv_sec;
Expand Down

0 comments on commit da24e87

Please sign in to comment.