mirror of
https://passt.top/passt
synced 2025-05-30 21:05:34 +02:00
passt: Add cppcheck target, test, and address resulting warnings
...mostly false positives, but a number of very relevant ones too, in tcp_get_sndbuf(), tcp_conn_from_tap(), and siphash PREAMBLE(). Signed-off-by: Stefano Brivio <sbrivio@redhat.com>
This commit is contained in:
parent
c3f8e4d2cd
commit
627e18fa8a
17 changed files with 159 additions and 118 deletions
6
pcap.c
6
pcap.c
|
@ -172,9 +172,7 @@ fail:
|
|||
*/
|
||||
void pcap_init(struct ctx *c, int index)
|
||||
{
|
||||
char name[] = PCAP_PREFIX PCAP_ISO8601_STR STR(UINT_MAX) ".pcap";
|
||||
struct timeval tv;
|
||||
struct tm *tm;
|
||||
|
||||
if (pcap_fd != -1)
|
||||
return;
|
||||
|
@ -183,6 +181,10 @@ void pcap_init(struct ctx *c, int index)
|
|||
return;
|
||||
|
||||
if (*c->pcap == 1) {
|
||||
char name[] = PCAP_PREFIX PCAP_ISO8601_STR STR(UINT_MAX)
|
||||
".pcap";
|
||||
struct tm *tm;
|
||||
|
||||
if (c->mode == MODE_PASTA)
|
||||
memcpy(name, PCAP_PREFIX_PASTA,
|
||||
sizeof(PCAP_PREFIX_PASTA));
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue